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

Free Support Forum - aspose.com

Save .msg file into HTML format- and the border got thicker

Hi there


I am working on saving .msg files into HTML format.
I met a file that in it’s HTML result, the bottom border of the table got thicker than the original one.

Here is my testing code.

String fileName = “【INFO】20171HAWAY.msg”;

ByteArrayOutputStream baos = new ByteArrayOutputStream();
MsgLoadOptions msgLoadOpt = new MsgLoadOptions();
msgLoadOpt.setPrefferedTextEncoding(Charset.forName(“UTF-8”));
MailMessage msg = MailMessage.load(new FileInputStream(“custom/input/msg/” + fileName), msgLoadOpt);

File dir = new File(“custom/output/msg/” + fileName);
dir.mkdirs();

HtmlSaveOptions saveOps = new HtmlSaveOptions();
saveOps.setCheckBodyContentEncoding(true);
saveOps.setEmbedResources(true);
saveOps.setMailMessageSaveType(MailMessageSaveType.getHtmlFormat());

msg.save(baos, saveOps);

IoUtil.write(new FileOutputStream(“custom/output/msg/” + fileName + “/result.html”), baos.toByteArray());

Please check my files in the attachment, and help me figure it out how to improve it, thank you~

Craig

Hi Craig,


Thank you for writing to Aspose Support team.

The behavior of Aspose.Email API resembles that of MS Outlook. If you convert the attached MSG file to HTML using MS Outlook, you will observe the same thing. For this reason, this isn’t an issue with Aspose.Email API. Please let us know if you have any further concerns in this regard.