Browse our Products

Aspose.Email for Java 22.12 Release Notes

All Changes

EMAILNET-40836Provide APIs to get Get Total Items Count of PersonalStorageFeature
EMAILNET-40697Add aditional folder like Activity, DistList, and RSS to StandardIpmFolderFeature
EMAILNET-40860Add Decrypt method to MapiMessageFeature
EMAILNET-40795Provide APIs to set product IDFeature
EMAILNET-40683How to save a single message from OLM to streamFeature
EMAILNET-40810Add IsInline property in AttachmentEnhancement
EMAILNET-40880IMAP Login password syntax with special charactersEnhancement
EMAILNET-40869Add option to save message headers in mhtmlEnhancement
EMAILNET-40887FileFormatUtil.DetectFileFormat detects the MBOX as MHTBug
EMAILNET-40874Incorrect conversion of message with html table to txtBug
EMAILNET-40877Extra chars in .ics processingBug
EMAILNET-40886Extracting attachment from winmail.dat generates incorrect outputBug
EMAILNET-40873Number of attachments after changing them is doubled in MSGBug
EMAILNET-40859Body issue during EML to PDF conversionBug
EMAILNET-40864CheckBounced returns empty BounceResult propertiesBug
EMAILNET-40875Exception: Invalid cryptographic message typeBug
EMAILJAVA-35019Incorrect time of the modified event’s occurrence in PST fileBug

New Features

Provide method to get Get Total Items Count of PersonalStorage

We have added the getTotalItemsCount() method to PersonalStorage.Store property. It returns the total number of message items contained in the PST.

Code example:

try (PersonalStorage pst = PersonalStorage.fromFile("my.pst", false)) {
    int count = pst.getStore().getTotalItemsCount();

Getting and adding a standard RSS Feeds folder in PersonalStorage.

A new RssFeeds value has been added to StandardIpmFolder enum.

The following is a code example to get an RSS Feeds folder.

try (PersonalStorage pst = PersonalStorage.fromFile("my.pst", false)) {
    FolderInfo rssFolder = pst.getPredefinedFolder(StandardIpmFolder.RssFeeds);

And code example to add an RSS Feeds folder.

try (PersonalStorage pst = PersonalStorage.create("my.pst", FileFormatVersion.Unicode)) {
    FolderInfo rssFolder = pst.createPredefinedFolder("RSS Feeds", StandardIpmFolder.RssFeeds);

Add Decrypt method to MapiMessage

Changes in public API:

  • MapiMessage.isEncrypted - Gets a value indicating whether the message is encrypted.
  • MapiMessage.decrypt() - Decrypts this message(method searches the current user and computer My stores for the appropriate certificate and private key).
  • MapiMessage.decrypt(X509Certificate2 certificate) - Decrypts this message with certificate.

Code sample:

X509Certificate2 privateCert = new X509Certificate2("privateCertFile", "password");
MapiMessage msg = MapiMessage.load("encrypted.msg");

if (msg.isEncrypted()) {
    MapiMessage decryptedMsg = msg.decrypt(privateCert);
    //MapiMessage decryptedMsg = msg.decrypt(/*byte[]*/rawPrivateCert, "password");

Setting a product ID when save MapiCalendar to ICS

We have added ProductIdentifier property to MapiCalendarIcsSaveOptions class. This property specifies the identifier for the product that created the iCalendar object.

Code sample:

MapiCalendarIcsSaveOptions icsSaveOptions = new MapiCalendarIcsSaveOptions();
icsSaveOptions.setProductIdentifier("Foo Ltd");"my.ics", icsSaveOptions);

Extract messages from OLM and MBOX by identifiers

Sometimes it is required to extract selected messages by identifiers. For example, your application stores identifiers in a database and extracts a message on demand. This is the efficient way to avoid traversing through the entire storage each time to find a specific message to extract. This feature is now available for OLM and MBOX storages.

New API members in OLM implementation:

  • Added EntryId property to OlmMessageInfo class.
  • Added overloaded extractMapiMessage(String id) method to OlmStorage class.

Code example:

for (OlmMessageInfo msgInfo : olmFolder.enumerateMessages()) {
    MapiMessage msg = storage.extractMapiMessage(msgInfo.getEntryId());

New API members in MBOX implementation:

  • Added MboxMessageInfo class with the EntryId property.
  • Added enumerateMessageInfo() method to MboxStorageReader class.
  • Added extractMessage(String id) method to MboxStorageReader class.

Code example:

MboxStorageReader reader = MboxStorageReader.createReader("my.mbox", new MboxLoadOptions());

for (MboxMessageInfo msgInfo : reader.enumerateMessageInfo()) {
    MailMessage eml = reader.extractMessage(msgInfo.getEntryId(), new EmlLoadOptions());

Add IsInline property in Attachment

Changes in public API:

  • MapiAttachment.IsInline - Gets a value indicating whether the attachment is inline or regular.

Code samples:

MapiMessage message = MapiMessage.load("fileName");

for (MapiAttachment attach : message.getAttachments()) {
    System.out.println(attach.getDisplayName() + ": " + attach.isInline());