Saving only the REAL attachments of an Outlook MailItem

后端 未结 3 1204
悲哀的现实
悲哀的现实 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:26

    This worked for me:

    var test = attachments[i].PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001E");
    if (string.IsNullOrEmpty((string)test))
    {
           //attachment
    }
    else
    {
           //embedded image
    }
    

提交回复
热议问题