Aspose.Email for Java 20.6 Release Notes

All Changes

EMAILNET-39778Implement support for AQS search for EWS clientFeature
EMAILNET-39844Message to HTML - how to preserve embedded attachment’s icons and textFeature
EMAILNET-39852Support for getting Email Category in MHTMLFeature
EMAILNET-39835Add overload for SaveAs with Stream input in PersonalStorageEnhancement
EMAILNET-39834Add overload for MergeWith with Streams in PersonalStorageEnhancement
EMAILNET-39860MapiCalendar does not have public property for organizerEnhancement
EMAILNET-39858No messages are read from MBOXEnhancement
EMAILNET-39843Text wrapping getting disturbed in case of lengthy CC/TO fields in exported PDFEnhancement
EMAILNET-39839Table borders disappeared while converting msgBug
EMAILNET-39871Embedded images appearing in attachments of save MSGBug
EMAILNET-39853Attachments lost during Appointment to MapiCalendar conversionBug
EMAILNET-39856EML Content are not read properlyBug
EMAILNET-39865NullReferenceException on extracting messages form PSTBug
EMAILNET-39686Exchange.ListMessages returns nothingBug
EMAILNET-39854Incorrect PropertyDescriptor’s for the named properties in MapiMessage.PropertiesBug
EMAILJAVA-34712Parsing SOAP Fault message if an error occurs during EWSClient processingBug
EMAILJAVA-34707Exception on adding msg to PST in MAC OSBug
EMAILNET-39861MapiCalendar does not save Attendees to ICSBug
EMAILNET-39842Multipart/related part marked with content-dispotion attachment missing in MailMessageBug
EMAILJAVA-34706Exceptions on Exchange EWS listMessages() and fetchItem() functionsBug

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)