Aspose.Email for Java 20.6 Release Notes

All Changes

Key Summary Category
EMAILNET-39778 Implement support for AQS search for EWS client Feature
EMAILNET-39844 Message to HTML - how to preserve embedded attachment’s icons and text Feature
EMAILNET-39852 Support for getting Email Category in MHTML Feature
EMAILNET-39835 Add overload for SaveAs with Stream input in PersonalStorage Enhancement
EMAILNET-39834 Add overload for MergeWith with Streams in PersonalStorage Enhancement
EMAILNET-39860 MapiCalendar does not have public property for organizer Enhancement
EMAILNET-39858 No messages are read from MBOX Enhancement
EMAILNET-39843 Text wrapping getting disturbed in case of lengthy CC/TO fields in exported PDF Enhancement
EMAILNET-39839 Table borders disappeared while converting msg Bug
EMAILNET-39871 Embedded images appearing in attachments of save MSG Bug
EMAILNET-39853 Attachments lost during Appointment to MapiCalendar conversion Bug
EMAILNET-39856 EML Content are not read properly Bug
EMAILNET-39865 NullReferenceException on extracting messages form PST Bug
EMAILNET-39686 Exchange.ListMessages returns nothing Bug
EMAILNET-39854 Incorrect PropertyDescriptor’s for the named properties in MapiMessage.Properties Bug
EMAILJAVA-34712 Parsing SOAP Fault message if an error occurs during EWSClient processing Bug
EMAILJAVA-34707 Exception on adding msg to PST in MAC OS Bug
EMAILNET-39861 MapiCalendar does not save Attendees to ICS Bug
EMAILNET-39842 Multipart/related part marked with content-dispotion attachment missing in MailMessage Bug
EMAILJAVA-34706 Exceptions on Exchange EWS listMessages() and fetchItem() functions Bug

New features

Render custom icons in message attachment while HTML conversion

Sometimes, the message contains in-line attachments, that are shown up as icon images in a message body. Such messages may create problems while converting them to HTML, since the icon images are lost. This is because attachment’s icons are not held directly in the message.

We have fixed this problem so that the user can customize the icons for attachments when converting the message to HTML. For that, the HtmlSaveOptions.ResourceHtmlRendering event has been added:

 HtmlSaveOptions options = new HtmlSaveOptions();

options.setResourceHtmlRenderingHandler(new ResourceHtmlRenderingHandler() {


   public void invoke(Object sender, ResourceHtmlRenderingEventArgs e) {

        AttachmentBase attachment = (AttachmentBase) sender;


       if (attachment.getContentType().getName().endsWith(".pdf")) {


       } else if (attachment.getContentType().getName().endsWith(".docx")) {


       } else if (attachment.getContentType().getName().endsWith(".jpg")) {


       } else {






String fileName = "message.msg";

MailMessage mailMessage = MailMessage.load(fileName);"fileName.html", options);

Get Email Category in MHTML

We have introduced the ability to add a category header while converting message to MHML.

 MapiMessage msg = new MapiMessage("", "", "subj", "body");

msg.setCategories(new String[] { "Urgently", "Important" });

MhtSaveOptions saveOptions = new MhtSaveOptions();


    saveOptions.getFormatTemplates().get_Item(MhtTemplateName.CATEGORIES).replace("Categories", "Les catégories"));

saveOptions.getRenderingHeaders().add(MhtTemplateName.CATEGORIES);"fileName.mhtml", saveOptions);

Create PST with size more than 2Gb using OutputStream

The user can optimize PST internal cache using new PersonalStorage API method:

blockSize - The optimal block size to expand cache buffer(in bytes)

 PersonalStorage create(OutputStream stream, int blockSize, /*FileFormatVersion*/int version)