Saving only the REAL attachments of an Outlook MailItem

后端 未结 3 1212
悲哀的现实
悲哀的现实 2021-02-08 14:10

I\'m currently developing an Outlook Addin which saves MailItems and Attachments in my MSSQL Database.

I got a method where I save the MailItem with all it\'s attachment

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-08 14:29

    Depends on how you define 'real' or 'proper' attachments. I'm going to assume you want to disregard all images that are embedded in the email. These are also attachments but are referenced in the actual body of the html email.

    See this answer for an explanation on how attachments are embedded. The key is to disregard attachments that have a Content-ID value that is referenced by an image tag within the body of the email itself.

提交回复
热议问题