Attachment - Downloads

  • Thread starter Thread starter Jithu
  • Start date Start date
J

Jithu

Hi All,

I have a code that downloads and save attachments from outlook mails....It
also send reply asking to attach files if attachment is missing in a mail.

The Problem is that, .jpg, .gif, files present in the mailbody(signature
images) is also considered as attachments. But i only want to check
attachments attached to the mail....

Can someone help me in solving this....
THANKS IN ADVANCE FOR ANY HELP...

Jithu
 
Check each attachment for its Type. If it's anything other than
OlAttachmentType.olByValue then it's an attachment that's embedded in the
email and not a "true" attachment.

Be aware that the Type will only be valid for messages that are saved or
received. Also, in some cases you would have to also look at some MAPI
properties on the attachment to really trap every possibility. The
additional properties to check are only present on embedded attachments:

PR_ATTACH_CONTENT_ID: "urn:schemas:mailheader:content-id"

PR_ATTACH_CONTENT_LOCATION: "urn:schemas:mailheader:content-location"

You may also want to look at PR_ATTACH_MIME_TAG
("http://schemas.microsoft.com/mapi/proptag/0x370E001E")

All of those properties can be accessed if present in Outlook 2007 using the
PropertyAccessor object of the Attachment.
 
Back
Top