Author |
|
guest Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 29 July 2004 at 1:45am | IP Logged
|
|
|
I want download one attachment from a email which have many attachments , is it possible do not download entire message ?
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 29 July 2004 at 8:03am | IP Logged
|
|
|
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 |
|
|