Aspose.Email for Java 20.3 Release Notes

Contents
[ ]

All Changes

KeySummaryCategory
EMAILNET-39716Add streaming interface to OLMClientFeature
EMAILNET-39712extraction of OLM files timeoutFeature
EMAILNET-39731Query by email attachment name using ExchangeQueryBuilder classEnhancement
EMAILNET-39753Wrong encoded characters into Attachment Name is fetchedEnhancement
EMAILNET-39755QueryBuilder returning wrong number of emailBug
EMAILNET-39707MapiPropertyContainer cannot be cast to MapiMessageBug
EMAILNET-39759Exception on reading message attachments from OLM storageBug
EMAILNET-39763MailMessage.CheckSignature() throws exception in Evaluation mode.Bug
EMAILNET-39754Read/Undread status is not maintained on adding messages to PST from Office 365 accountBug
EMAILNET-39748Thai characters in subject are rendered as ? on uploading calendar event from PSTBug
EMAILJAVA-34681ExceptionInInitializerError on saving emailBug
EMAILJAVA-34677On MSG conversion to MHTML the “FormatException: An invalid character was found in the Base-64 stream” has been thrownBug
EMAILJAVA-34675On MSG conversion to MHTML the “FormatException: The specified e-mail address is currently not supported” has been thrownBug
EMAILJAVA-34674On MSG conversion to MHTML the “ArgumentException: The ContentID cannot contain a ‘<’ or ‘>’ character” has been thrownBug
EMAILJAVA-34673On MSG conversion to MHTML the “EndOfStreamException: Attempted to read past the end of the stream” has been thrownBug
EMAILJAVA-34671On MSG conversion to MHTML the “InvalidOperationException: Message class does not meet IPM.Contact” has been thrownBug
EMAILJAVA-34670On MSG conversion to MHTML the “ArrayIndexOutOfBoundsException” has been thrownBug
EMAILJAVA-34669On MSG conversion to MHTML the “FormatException: The specified string is not in the form required for an e-mail address” has been thrownBug
EMAILJAVA-34668On MSG conversion to MHTML the “UriFormatException: Invalid URI: The format of the URI could not be determined: reminder.wav”” has been thrownBug
EMAILJAVA-34667On MSG conversion to MHTML the “UriFormatException: Invalid URI: Invalid port specified” has been thrownBug
EMAILJAVA-34665How to set description(body) for modified occurenceBug
EMAILJAVA-34664Eml is not converted properlyBug
EMAILJAVA-34658Aspose.Email for Java does not display recipients and CC issuesBug

New features

What is OLM storage?

OLM file is the storage file format of Outlook for Mac. OLM file is storing local data, such as emails, attachments, notes, calendar data, contacts, tasks, journal etc..

OLM file is only used by Mac Outlook. It can’t be accessed or opened by Outlook for Windows. The Windows version of Outlook supports only PST file format for storing data. Nonetheless, you can work with OLM files via Aspose.Email for Java.

New API for working with OLM storages

We have added a new API for working with OLM storages. Message extraction from OLM storage is now more flexible and faster.

An OlmMessageInfo class has been added, which provides brief information about a message in the storage.

The OlmFolder class was extended by the following methods:


 //gets the subfolder by name

OlmFolder getSubFolder(String subfolderName, boolean ignoreCase);

//exposes the enumerator, which supports an iteration of MapiMessages in the current folder

Iterable<MapiMessage> enumerateMapiMessages();

//exposes the enumerator, which supports an iteration of OlmMessageInfo's in the current folder

Iterable<OlmMessageInfo> enumerateMessages();

//exposes the enumerator, which supports an iteration of OlmMessageInfo's within a given range

Iterable<OlmMessageInfo> enumerateMessages(int startIndex, int count);

//exposes the enumerator, which supports an iteration of OlmMessageInfo's by search criteria

Iterable<OlmMessageInfo> enumerateMessages(MailQuery query); 

The OlmStorage class was extended by the following methods:


 //load OLM storage from file

static OlmStorage fromFile(String fileName);

//load OLM from stream

static OlmStorage fromStream(InputStream stream);

//gets the folder hierarchy

List<OlmFolder> getFolders();

//gets the folder by name

OlmFolder getFolder(String name, boolean ignoreCase);

//extracts the MapiMessage from OLM storage

MapiMessage extractMapiMessage(OlmMessageInfo messageInfo); 

The following examples show the use of new methods:


 // Enumerates all messages in a given folder

OlmStorage olm = OlmStorage.fromFile("fileName");

try {

    OlmFolder inbox = olm.getFolder("inbox", true);

   for (OlmMessageInfo messageInfo : inbox.enumerateMessages()) {

        System.out.println(messageInfo.getSubject());

   }

} finally {

    olm.dispose();

}

// Enumerates a range of messages in a given folder

OlmStorage olm = OlmStorage.fromFile("fileName");

try {

    OlmFolder inbox = olm.getFolder("inbox", true);

   int startIndex = 10;

   int count = 100;

   for (OlmMessageInfo messageInfo : inbox.enumerateMessages(startIndex, count)) {

        System.out.println(messageInfo.getSubject());

   }

} finally {

    olm.dispose();

}

// Enumerates messages by search criteria

OlmStorage olm = OlmStorage.fromFile("fileName");

try {

    OlmFolder inbox = olm.getFolder("inbox", true);

    MailQueryBuilder mailQueryBuilder = new MailQueryBuilder();

    mailQueryBuilder.getSubject().contains("invitation");

    mailQueryBuilder.getFrom().contains("Mark");

   for (OlmMessageInfo messageInfo : inbox.enumerateMessages(mailQueryBuilder.getQuery())) {

        System.out.println(messageInfo.getSubject());

   }

} finally {

    olm.dispose();

}

// Enumerates all messages and the extraction of some of them

OlmStorage olm = OlmStorage.fromFile("fileName");

try {

    OlmFolder inbox = olm.getFolder("inbox", true);

   for (OlmMessageInfo messageInfo : inbox.enumerateMessages()) {

       if (messageInfo.hasAttachments()) {

            MapiMessage msg = olm.extractMapiMessage(messageInfo);

       }

   }

} finally {

    olm.dispose();

}

Query by email attachment name using ExchangeQueryBuilder class

New property was added to ExchangeQueryBuilder class:


 // Gets the field that allows to find items with a specified attachment name.

StringComparisonField getAttachmentName

Code sample:


 ExchangeQueryBuilder builder = new ExchangeQueryBuilder();

builder.getAttachmentName().equals("attachmentName");

MailQuery query = builder.getQuery();

ExchangeMessageInfoCollection messages = ewsClient.listMessages("InboxUri", query, false);