We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Retreiving background from eml

Hi,


Is there any simple way to save an eml file to html with the background in it?

In the HtmlBody of the MailMessage, the background is set in the body element as this: background="cid:220A7C3D-E10C-497D-BC2F-6F63EF93E4E2"

The MailMessage object has a Linked Resource with the ID.

Attached is an example eml file.

Sincerely,

Geert-Jan Smulders

Hi Geert-Jan Smulders,


Sorry for delayed response.

Please correct me if I am interpreting your question wrong. If you need to save an EML file to MHTML format with background then you have to load the EML file into an instance of MailMessage and save it back in MHTML format.

Below is C# source code for your reference,

MailMessage message = MailMessage.Load(“C:\temp\test.eml”, MessageFormat.Eml);

message.Save(“c:\temp\outmessage.mhtml”, MailMessageSaveType.MHtmlFromat);

Hi Babar,


Thank you for your response.

I’m trying to convert an EML file that contains a background to PDF. Unfortunately, I can’t get the background to work. I can see the background in de MHTML file, so I will take this issue to the Aspose.Words forum.

Thank you for your help.

Sincerely,

Geert-Jan