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

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

$
0
0
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

Viewing all articles
Browse latest Browse all 1367

Trending Articles