Browse our Products

Aspose.Email for Java 22.2 Release Notes

All Changes

KeySummaryCategory
EMAILNET-40522Converted PST files from EML does not display reference attachments attached to the emailsEnhancement
EMAILNET-40491Retrieving message class from ExchangeMessageInfo objectEnhancement
EMAILJAVA-35023Handling TNEF mail issue with plain-text bodyBug
EMAILNET-40531SmtpClient.Send throws Exception “The handshake failed due to an unexpected packet format”Bug
EMAILJAVA-35015Extracted Metadata FROM is different as it is in OutlookBug
EMAILJAVA-35010java.lang.OutOfMemoryError: Java heap space when converting a nested message from msg fileBug
EMAILNET-40530MapiMessage.FromMailMessage() returns null sender email addressBug
EMAILJAVA-35022Not a valid Win32 FileTime exception is thrown while sending mail with IMAPBug

New Features

Support for the reference attachments

A reference attachment is an alternative to the local file attachment. In some cases, reference attachments may be preferable, for example, if you want to manage its access.

Changes in public API

ReferenceAttachment - represents a reference attachment. AttachmentPermissionType - The permission type data associated with a web reference attachment. AttachmentProviderType - The type of web service manipulating the attachment.

Code sample

MailMessage eml = MailMessage.load("fileName");

ReferenceAttachment refAttach = new ReferenceAttachment("https://[attach_uri]")
refAttach.setName("Document.docx");
refAttach.setProviderType(AttachmentProviderType.OneDrivePro);
refAttach.setPermissionType(AttachmentPermissionType.AnyoneCanEdit);

eml.getAttachments().addItem(refAttach);

Retrieving message class from ExchangeMessageInfo object

We have added MessageClass property to ExchangeMessageInfo class.

Code sample

try (IEWSClient client = EWSClient.getEWSClient(uri, credentials))
{
    ExchangeMessageInfoCollection messageInfoCollection = client.listMessagesFromPublicFolder(publicFolder);

    for (ExchangeMessageInfo messageInfo : messageInfoCollection)
    {
        System.out.println("Message Class: " + messageInfo.getMessageClass());
    }
}