I have an Outlook email and I need to process it’s attachments. But when iterating through the attachments, if the attachment is a signature I want to skip it.
To know if the attachment is a signature I am using:
outlookMailItem.Attachments[i].PropertyAccessor.GetProperty(
"http://schemas.microsoft.com/mapi/proptag/0x3712001E");
But I am getting an Outlook security alert.
Is there another way using a safer code? Can it be done using Redemption?
PR_ATTACH_CONTENT_IDproperty is a good indication that an attachment is an embedded image, but there are attachments that havePR_ATTACH_CONTENT_IDproperty set, but they are not embedded images (Lotus Notes likes to setPR_ATTACH_CONTENT_IDon all attachments).Even if
PR_ATTACH_CONTENT_IDis not set, Outlook can usePR_ATTACH_CONTENT_LOCATIONorPR_ATTACH_LONG_FILENAMEto load an embedded image.The only real test is to parse the HTML body and figure out which
<img>tags refer to the attachments.Redemption (I am its author) will let you access that property using RDOAttachment.Fields, you can also use RDOAttachment.Hidden property, which jumps through a few hoops to figure out whether an attachment is an embedded image and not a "real" attachment.