While trying to fetch attachment details aspose MailMessage treats Inline Images as Regular attachments.
How do we differentiate between Inline Images and Reular while using Apose MailMessage?
Is there any possibility that we can get the Inline Images as part of the HTML Body itself? Rather than replacing it with cids
Hi @ArvindNalluru
Regular attachments are stored in MailMessage’s Attachments collection.
Inline images are stored in MailMessage’s LinkedResources collection.
To achieve this result, you need to save the MailMessage in html with these options :
HtmlSaveOptions options = SaveOptions.DefaultHtml;
MailMessage msg = MailMessage.Load(fileName);
options.ResourceRenderingMode = ResourceRenderingMode.EmbedIntoHtml;
msg.Save(outFileName, options);
Regular attachments are stored in MailMessage’s Attachments collection.
Inline images are stored in MailMessage’s LinkedResources collection.
eml has attachments as inline but after eml goes through aspose. These attachments are treated as Regular attachments and MailMessage’s LinkedResources collection is empty.
To achieve this result, you need to save the MailMessage in HTML with these options :
Need this while parsing eml not to saving
@ArvindNalluru
Could you share the source file for investigation?
You can save message in separately stream for analyze. Aspose.Email API does not change html content at loading and can not provide changed HtmlBody.