I need to receive and save the attachments from the mail element, but using the code below it returns all the attachments - this means that it also returns embedded images, such as the signature of the sender, with the logo, which is the image. How can I distinguish true nesting from embedded images ? I have seen a lot on the forums, but itβs still not clear to me.
public static void SaveData(MailItem currentMailItem) { if (currentMailItem != null) { if (currentMailItem.Attachments.Count > 0) { for (int i = 1; i <= currentMailItem.Attachments.Count; i++) { currentMailItem.Attachments[i].SaveAsFile(@"C:\TestFileSave\" + currentMailItem.Attachments[i].FileName); } } } }
c # outlook vsto outlook-addin
Liz
source share