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

Free Support Forum - aspose.com

HTML Body different when open with MapiMessage vs MailMessage

I’ve noticed there is difference when getting the HTML body of an email depending on if the email is opened with MapiMessage vs MailMessage. I’ve attached a code sample and a file reproducing the issue. I would have expected the HTML body to be the same regardless of whether of the file was opened with MapiMessage or MailMessage. I’m using Aspose Email for Java 22.9 on Java 11.

aspose-html-email-body.zip (18.3 KB)

@tucker.barbour

We have logged this problem in our issue tracking system as EMAILJAVA-35121. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tucker.barbour

If you need to keep the HTML body unchanged for Appointment EMLs, you need to use the ForcedRtfBodyForAppointment option as shown below. Hope this helps you.

MapiConversionOptions mco = MapiConversionOptions.getUnicodeFormat();
mco.setForcedRtfBodyForAppointment(false);
MapiMessage mapiMessage = MapiMessage.fromMailMessage(mailMessage, mco);