Browse our Products

Aspose.Email for Java 23.3 Release Notes

All Changes

KeySummaryCategory
EMAILNET-40797Add property GetTotalItemsCount in OlmStorageFeature
EMAILNET-40881Detect either MapiMessage is OFT or MSGFeature
EMAILNET-40912Detect NSF File FormatFeature
EMAILNET-40981VCardContact.LoadAsMultiple not returns property valuesEnhancement
EMAILNET-40974At loading from emlx and saving to html some LF separators included in out fileBug
EMAILNET-40954Fetch Messages from iCloud IMAP Server FailedBug
EMAILNET-40971Body content missingBug
EMAILNET-40990FormatException BugBug
EMAILNET-40986Error parsing EMLBug
EMAILNET-40996MapiMessageItem Save IssueBug
EMAILNET-40958MapiContact not honouring MAPI properties when generating MIMEBug
EMAILNET-40955Bug in Msg and Oft: duplicate attachmentsBug
EMAILNET-40985TemplateEngine replaces all occurences of the variable name even if it is not a variableBug
EMAILNET-41005Problem with the attachment-filename of a signed emailBug
EMAILNET-40997MailMessage AlternativeView part duplicates message headers after reloadingBug
EMAILNET-40935XMailer field does not set sometimesBug
EMAILNET-40710FETCH Message via IMAP, use BODY[] rather than RFC822Bug
EMAILJAVA-35156GraphApi listMessages getItemId() not uniqueBug
EMAILJAVA-35141Problem with SMIME signatureBug

New Features

Provide method to get Get Total Items Count of PersonalStorage

We have added the GetTotalItemsCount() method to OlmStorage class. It returns the total number of message items contained in the OLM storage.

Code example:

try (OlmStorage olm = new OlmStorage("storage.olm")) {
    int count = olm.getTotalItemsCount();
}

How to determine if MapiMessage is OFT or MSG

OFT (Outlook File Template) file is an email template created by Microsoft Outlook. MapiMessage also supports loading it using the load method. But having a MapiMessage object it is difficult to determine whether it was loaded from an OFT or MSG file, as OFT file format uses the MSG file format at its base. We have added the MapiMessage.IsTemplate property, which allows us to determine whether the MapiMessage was loaded from an OFT or MSG file.

Code example:

MapiMessage msg = MapiMessage.load("message.msg");
boolean isOft = msg.isTemplate(); // returns false

MapiMessage msg = MapiMessage.load("message.oft");
boolean isOft = msg.isTemplate(); // returns true

Also, we have added a new ways to save MapiMessage or MailMessage in OFT format, with using SaveOptions:

// Save the MailMessage to OFT format
try (MailMessage eml = MailMessage.load("message.eml", new EmlLoadOptions())) {
    eml.save("message.oft", SaveOptions.getDefaultOft());

    // or alternative way #2
    SaveOptions saveOptions = new MsgSaveOptions(MailMessageSaveType.getOutlookTemplateFormat());
    eml.save("message.oft", saveOptions);

    // or alternative  way #3
    saveOptions = SaveOptions.createSaveOptions(MailMessageSaveType.getOutlookTemplateFormat());
    eml.save("message.oft", saveOptions);

}

// Save the MapiMessage to OFT format
try (MapiMessage msg = MapiMessage.load("message.msg")) {
    msg.save("message.oft", SaveOptions.getDefaultOft());

    // or alternative way #2
    SaveOptions saveOptions = new MsgSaveOptions(MailMessageSaveType.getOutlookTemplateFormat());
    msg.save("message.oft", saveOptions);

    // or alternative  way #3
    saveOptions = SaveOptions.createSaveOptions(MailMessageSaveType.getOutlookTemplateFormat());
    msg.save("message.oft", saveOptions);
}

Detect an NSF File Format

We have added a feature to recognize the NSF file format:

int formatType = FileFormatUtil.detectFileFormat("storage.nsf").getFileFormatType(); // Returns FileFormatType.Nsf