Search The ForumSearch   RegisterRegister  LoginLogin

MailBee IMAP4

 AfterLogic Forum : MailBee IMAP4
Subject Topic: about download attachment Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
guest
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 29 July 2004 at 1:45am | IP Logged Quote guest

I want download one attachment from a email which have many attachments , is it possible do not download entire message ?
Back to Top View guest's Profile Search for other posts by guest
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 29 July 2004 at 8:03am | IP Logged Quote Alex

You can download an e-mail partially (for example, first 10KB), but it's not possible to download specific attachment. If you're sure that requested attachment is first in the message, and the size of the body text + attachment size is always less than 20000 bytes (e.g. all your e-mails have the same structure), you can download headers + 25000 bytes, so resulting message will have this attachment. I recommend downloading 25000 bytes in this case (instead of 20000) to consider MIME boundaries and other service info between body text and attachment contents.

' ... connect/select mailbox goes here
Set Msg = IMAP4.RetrieveSingleMessageHeaders(1, False, 25000)
' Msg will have headers and first 25000 bytes of the
' message raw body.
If Msg.Attachments.Count > 0 Then
' Display filename of the attachment
MsgBox Msg.Attachments(1).Filename
End If

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide