Missing inline images after conversion from msg to HTML

I convert a msg file to HTML by
MailMessage mail = MailMessage.load(msgPath);
SaveOptions opt = SaveOptions.createSaveOptions(MailMessageSaveType.getHtmlFormat());
mail.save(htmlPath, opt);

Some images are changed to Base64 encoded and they can be displayed in HTML.


Other images remain in CID, but the corresponding image file is not there.


Is there any save option that can change all inline images to Base64 encoded?

Hi,


Thank you for writing to Aspose Support team.

Could you please try setting the EmbedResources property to true for HtmlSaveOptions and see if it solves the problem? If the issue persists, please share your sample input message file with us for our further consideration.

Hi,

Setting EmbedResources does not work, the generated HTML is same as before.

The msg and HTML are attached. The first few images are OK, but the last one is still referring to cid.

Samuel

Hi Samuel,


We have tested it with the latest version of Aspose.Email for Java 6.7.0 and were not able to observe any such problem at our end. Please have a look at the following sample code and attached output html file generated as a result of this code and let us know your feedback.

Sample Code:

MailMessage msg = MailMessage.load(“761174\aceoffix.msg”, new MsgLoadOptions());

HtmlSaveOptions so = new HtmlSaveOptions();

so.setEmbedResources(true);

msg.save(“761174\outJava.html”, so);

Hi Kashif,

I call the same API. The only difference is that I’m using evaluation copy. Please confirm that this issue is solved after I buy the license.

Samuel

Hi Samuel,


Please get a 30-day temporary license free of cost for testing the issue at your end and let us know your feedback. The evaluation limitations are as mentioned here in our documentation that shows that only 3 attachments as well as inline images can be extracted from an MSG file.