If a MSG has any attachments my goal is to extract them and save them in a given location. But there is a problema with some MSG files that do not have any attachments but the Aspose.Email still detects several imagens as attachments and the ways to verify if those are inline attachments or embedded to not work.
I tried with IsEmbeddedMessage property but it returns false:
//Create an instance of MailMessage and load an email file
mailMsg = Aspose.Email.MailMessage.Load(fileStream);
//Get all the email file attachments
foreach (Aspose.Email.Attachment attachment in mailMsg.Attachments)
bool isEmbeddedAttachment = attachment.IsEmbeddedMessage;
//Save the attachment file attachment.Save(path);
Also tried with Aspose.Email.Mapi.MapiAttachment using the “IsInlineAttachment” example provided by you in your documentation:
also with the same result unfortunately.
This problem can also be seen using your online converter (MSG to PDF), you will notice many imagens will show that are not present in the original MSG not even present as attachments:
I provide this msg file that you will be able to reproduce the problem:
MSG without attachements.zip (133.9 KB)
This problem do not happen in older Aspose.Email versions, can you please fix it?