Aspose.Email for Android via Java 20.4 Release Notes

Contents
[ ]
KeySummaryCategory
EMAILNET-39716Add streaming interface to OLMClientFeature
EMAILNET-39712extraction of OLM files timeoutFeature
EMAILNET-39753Wrong encoded characters into Attachment Name is fetchedEnhancement
EMAILNET-39783Support for the ability to Ignore exceptionsEnhancement
EMAILNET-39747Length cannot be less than zero on loading EMLBug
EMAILNET-39746From email information is missing in exported MHTMLBug
EMAILNET-39734AlternateView not added when loading a MHTML and not adding any attachmentBug
EMAILNET-39732DKIM Signing failed with body hash errorBug
EMAILNET-39735Email with VCalendar throws exceptionBug
EMAILNET-39703How check Read/Unread status of messages from thunderbird Mbox file (C# .NET)Bug
EMAILNET-39729Converted MSG to EML do not have full email addressesBug
EMAILNET-39733Keeping the charset of the original message after adding it to PSTBug
EMAILNET-39724Messages extracted from PST corrupted (2)Bug
EMAILNET-39711Extracting Emails From OLM FileBug
EMAILNET-39713Export to MHTML never completesBug
EMAILNET-39714MapiMessage.ToMailMessage is crashing the processBug
EMAILNET-39739Not all attachements are extracted from MSGBug
EMAILJAVA-34653Messages extracted from PST corruptedBug
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-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
EMAILJAVA-34684Message fails to process with ArgumentExceptionBug
EMAILNET-39799Space getting removed while saving OFT to MSGBug
EMAILNET-39797ArgumentOutOfRangeException occurs when loading MailMessage from an html fileBug
EMAILNET-39770System.ArgumentOutOfRangeException while loading a MSGBug
EMAILNET-39764How to set description(body) for modified occurenceBug
EMAILNET-39790ReplyMessageBuilder.buildresponse fails while building a response if attachments are presentBug
EMAILNET-39789Converted MSG to EML does not have From addressBug
EMAILNET-39792MSG to EML output wrong (Plain Text)Bug

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();

}

Support For The Ability to Ignore Exceptions

We have prepared a new functionality to ignore exceptions - ExceptionManager class has been added to provide ignore exceptions ability:


 public class ExceptionManager

Code Examples:

Set a callback to handle exceptions:


 ExceptionManager.setIgnoreExceptionsHandler( new IgnoreExceptionsCallback() {

   //exception path: {Module}\{Method}\{Action}\{GUID}

   //example: MailMessage\Load\DecodeTnefAttachment\64149867-679e-4645-9af0-d46566cae598

   public boolean invoke(AsposeException ex, String path) {

       //Ignore all exceptions on MailMessage.Load

       return path.equals("MailMessage\\Load");

   }

});

Or use an alternative:


 //Ignore all exceptions on MailMessage.Load

ExceptionManager.getIgnoreList().add("MailMessage\\Load");

It’s possible to ignore all exceptions:


  ExceptionManager.setIgnoreAll(true);

Also, you can set a callback for ignored exceptions log:


  ExceptionManager.setIgnoreExceptionsLogHandler( new IgnoreExceptionsLogCallback() {

 public void invoke(String message) {

 System.out.println("=== EXCEPTION IGNORED === " + message);

 }

});

The user will be notified, that the exception can be ignored by an error message. For example:


 Exceptioin message:

AsposeArgumentException: properties should not be empty.

If you want to ignore an exception and want to proceed further then you can use:

ExceptionManager.getIgnoreList().add("MailMessage\\Load\\DecodeTnefAttachment\\64149867-679e-4645-9af0-d46566cae598")

Invalid TNEF Attachment will be interpreted as regular attachment.