Wrong HTML Formatting in MapiTask (Java)

I have a task in Office 365 with table and some text in some formatting, after creating PST with that MapiTask, the formating is broken, at least table is not shown.

Code :
MapiTask retTask = new MapiTask(task.getSubject(), text, new Date(), new Date());
retTask.setBodyContent(html, BodyContentType.Html);

Please see attached zip with HTML body content and screenshot of the original task and one from the PST created.

Thanks

Original task.png (116.7 KB)
PST Version.png (115.4 KB)
body.zip (1.1 KB)

@slavago,

I have observed your comments. Can you please share complete working project along with source file so that we may further investigate to help you out.

Well, It’s not an easy task.
Can you just create a MapiTask with html body that I’ve sent and you will see the issue.
Thanks

@slavago,

Thank you for your feedback. I request you to please provide the working sample project that you are using on your end to reproduce the issue along with generated and desired output. I am also assuming that you will be using Aspose.Email 19.1 on your end. Please provide the requested information so that we may proceed further to help you out.

Hi,
Please see that working method that reproduces this issue (using latest 19.1 version):

public static void createTask() {

MapiTask tmpTask = new MapiTask(“Test task”, null, Date.from(LocalDate.now().plusDays(5).atStartOfDay(ZoneId.systemDefault()).toInstant()),

Date.from(LocalDate.now().plusDays(10).atStartOfDay(ZoneId.systemDefault()).toInstant()));

PersonalStorage pst = PersonalStorage.create("/tmp/pst1.pst", 0);

FolderInfo tasksFolder = pst.createPredefinedFolder(“Tasks”, StandardIpmFolder.Tasks);

tmpTask.setBodyContent("<html>\n" +

“<head>\n” +

“<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8”>\n” +

“<meta name=“Generator” content=“Microsoft Exchange Server”>\n” +

“<!-- converted from rtf -->\n” +

“<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>\n” +

“</head>\n” +

“<body>\n” +

“<font face=“Calibri” size=“2”><span style=“font-size:11pt;”>\n” +

“<table width=“798” style=“width:478.8pt;”>\n” +

“<col width=“199” style=“width:119.7pt;”>\n” +

“<col width=“199” style=“width:119.7pt;”>\n” +

“<col width=“199” style=“width:119.7pt;”>\n” +

“<col width=“199” style=“width:119.7pt;”>\n” +

“<tr>\n” +

“<td style=“background-color:black;”><font color=”#CFCFCF"><span style=“background-color:black;”><span style=“background-color:yellow;”><b>Test</b></span></span></font></td>\n" +

“<td style=“background-color:black;”><font color=”#CFCFCF"><span style=“background-color:black;”><b>1</b></span></font></td>\n" +

“<td style=“background-color:black;”><font color=”#CFCFCF"><span style=“background-color:black;”><b>2</b></span></font></td>\n" +

“<td style=“background-color:black;”><font color=”#CFCFCF"><span style=“background-color:black;”><b>3</b></span></font></td>\n" +

“</tr>\n” +

“<tr>\n” +

“<td style=“background-color:black;”><font color=”#CFCFCF"><span style=“background-color:black;”><b>A</b></span></font></td>\n" +

“<td style=“background-color:#999999;”><span style=“background-color:#999999;”>asdasda</span></td>\n” +

“<td style=“background-color:#999999;”><span style=“background-color:#999999;”>\n” +

“<ul style=“margin:0;padding-left:36pt;”>\n” +

“<li></li></ul>\n” +

“</span></td>\n” +

“<td style=“background-color:#999999;”><span style=“background-color:#999999;”>\n” +

“<ul style=“margin:0;padding-left:36pt;”>\n” +

“<li></li></ul>\n” +

“</span></td>\n” +

“</tr>\n” +

“<tr>\n” +

“<td style=“background-color:black;”><font color=”#CFCFCF"><span style=“background-color:black;”><b>B</b></span></font></td>\n" +

“<td style=“background-color:#CCCCCC;”><span style=“background-color:#CCCCCC;”>\n” +

“<ul style=“margin:0;padding-left:36pt;”>\n” +

“<li></li></ul>\n” +

“</span></td>\n” +

“<td style=“background-color:#CCCCCC;”><span style=“background-color:#CCCCCC;”>dasd</span></td>\n” +

“<td style=“background-color:#CCCCCC;”><span style=“background-color:#CCCCCC;”>asdad</span></td>\n” +

“</tr>\n” +

“<tr>\n” +

“<td style=“background-color:black;”><font color=”#CFCFCF"><span style=“background-color:black;”><b>C</b></span></font></td>\n" +

“<td style=“background-color:#999999;”><span style=“background-color:#999999;”>1)</span></td>\n” +

“<td style=“background-color:#999999;”><span style=“background-color:#999999;”>\n” +

“<ul style=“margin:0;padding-left:36pt;”>\n” +

“<li>2)</li></ul>\n” +

“</span></td>\n” +

“<td style=“background-color:#999999;”><span style=“background-color:#999999;”>\n” +

“<ul style=“margin:0;padding-left:36pt;”>\n” +

“<li>3)</li></ul>\n” +

“</span></td>\n” +

“</tr>\n” +

“</table>\n” +

“<div>&nbsp;</div>\n” +

“<div>&nbsp;</div>\n” +

“<div>&nbsp;</div>\n” +

“<div>Test – <b>Formatting Bold</b></div>\n” +

“<div>Test – <i>Formatting Italic </i></div>\n” +

“<div>Test – <u>Formatting Under</u></div>\n” +

“<div>&nbsp;</div>\n” +

“</span></font>\n” +

“</body>\n” +

“</html>”, BodyContentType.Html);

tasksFolder.addMapiMessageItem(tmpTask);

pst.dispose();

}

Thanks

@slavago,

I have worked with sample code and source file shared by you and have been able to observe issue. An issue with ID EMAILJAVA-34496 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Thanks,
Somehow I don’t receive such notifications when ticket is resolved,
can you please check why.
Thanks

@slavago,

I have checked your requirements. Actually, when thread is linked with issue then everyone in that thread gets notification. Can you receive the notification on responses in forum thread when we share? If you receive the response then you must also be receiving notification as well.

I almost don’t get notifications on the forum reponses. Very rare.
Please advise.
Thanks

@slavago,

I have observed your comments and i assured you we will look into this issue that why you don’t get notifications. We will get back to you with good news soon.

@slavago

We had confirmed at our end that emails are getting through from our server with the notifications which are relevant to you. I’m not sure why they’re not being delivered on your side. Did you check the Junk/Spam folder just in case those notifications dropped their.

If you still don’t find those notifications then please do let me know.

@slavago,

I have verified the issue status from our issue tracking system and regret to share that the issue is pending owing to issue being reproduced in Aspose.Email for .NET as well internally. We are hopeful to fix the issue in upcoming Aspose.Email for Jave 19.3 tentatively. We request for your patience and will share good news with you as soon as the issue will be fixed.

Strange, I started to get emails now for all forums, that even I never created any topic.
Please fix this

@slavago

You should not get any extra email anymore. Please let me know if this is still the same case.

The issues you have found earlier (filed as EMAILJAVA-34496) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by muhammadahmad