Email sent using MailMessage configured .msg is missing Text Formatting and missing Images from body of the email

@pvsnmurthy,

You can use Aspose.Words for Java to specify how headers and footers are exported to HTML, MHTML or EPUB. For example, the following code demonstrates how to disable the export of headers and footers when saving to MHTML format:

Document doc = new Document("D:\\TestCPMail-WithFooter\\TestCPMail-WithFooter.docx");

HtmlSaveOptions opts = new HtmlSaveOptions(SaveFormat.MHTML);
opts.setExportHeadersFootersMode(ExportHeadersFootersMode.NONE);

doc.save("D:\\TestCPMail-WithFooter\\awjava-18.9.mhtml", opts);

Possible values of ExportHeadersFootersMode Enumeration are:

Member Name Description Value
None Headers and footers are not exported. 0
PerSection Primary headers and footers are exported at the beginning and the end of each section. 1
FirstSectionHeaderLastSectionFooter Primary header of the first section is exported at the beginning of the document and primary footer is at the end. 2
FirstPageHeaderFooterPerSection First page header and footer are exported at the beginning and the end of each section. 3

@awais.hafeez - This is good to know, thanks. May I know the default behavior if we don’t use ```
setExportHeadersFootersMode

@pvsnmurthy,

Default value is ExportHeadersFootersMode.PER_SECTION for HTML/MHTML and ExportHeadersFootersMode.NONE for EPUB. Hope, this helps.

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

Thank you for fixing this, I will evaluate again in the release build!