Quantcast
Channel: Aspose.Email Product Family
Viewing all articles
Browse latest Browse all 1367

Some characters cannot be rendered correctly in result of saving from msg in to html

$
0
0
Hi there

We are working on saving .msg file into HTML format.

And here is our code for test:

byte[] msgContent;
msgContent = IOUtils.toByteArray(new FileInputStream("mailTest.msg"));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
MailMessage msg = MailMessage.load(new ByteArrayInputStream(msgContent));
HtmlSaveOptions saveOps = new HtmlSaveOptions();
saveOps.setCheckBodyContentEncoding(true);
saveOps.setEmbedResources(true);
saveOps.setMailMessageSaveType(MailMessageSaveType.getHtmlFormat());

msg.save(baos, saveOps);
IoUtil.write(new FileOutputStream("result.html"), baos.toByteArray());

Please also check the input file and output file in the attachment.
Some characters in the result are not rendered correctly.

Is there some option to fix this?


Craig

Viewing all articles
Browse latest Browse all 1367

Trending Articles