Browse our Products

Aspose.Email for Java 22.3 Release Notes

All Changes

KeySummaryCategory
EMAILNET-40547Add feature to set the X-ALT-DESC header in ICS fileEnhancement
EMAILNET-40525Performance issue while reading attachment detail with size 5MB using IMAP APIEnhancement
EMAILNET-40540Issue with fetched message using GraphClient as .msg with attachments and embedded imagesBug
EMAILJAVA-35027InvalidOperationException is thrown while loading EML fileBug
EMAILNET-40545MapiMessage to MailMessage: Sender property from MailMessage gets null valueBug
EMAILJAVA-35021MapiCalendarExceptionInfo getAttachments returns null when MapiCalendar is loaded from PST fileBug
EMAILNET-40557Messages extracted from PST file can’t open in Outlook 2016Bug
EMAILJAVA-35033InvalidOperationException is thrown while loading EML fileBug

New Features

Set the X-ALT-DESC header in ICS file

The X-ALT-DESC header is a HTML formatted description in iCalendar (.ics) items. To create an appointment with HTML content, set the isDescriptionHtml property to true.

Code sample

Appointment appointment = new Appointment("Bygget 83",
        new Date(), // start date
        addHours(new Date(), 1), // end date
        new MailAddress("TintinStrom@from.com", "Tintin Strom"), // organizer
        MailAddressCollection.to_MailAddressCollection(
                new MailAddress("AinaMartensson@to.com", "Aina Martensson"))); // attendee
appointment.setDescriptionHtml(true);
appointment.setDescription(
                  "      <html>\n"
                + "       <style type=\"\"text/css\"\">\n"
                + "        .text {\n"
                + "               font-family:'Comic Sans MS';\n"
                + "               font-size:16px;\n"
                + "              }\n"
                + "       </style>\n"
                + "      <body>\n"
                + "       <p class=\"\"text\"\">Hi, I'm happy to invite you to our party.</p>\n"
                + "      </body>\n"
                + "      </html>\n");

List the message attachments using the IMAP client

A feature has been added to get information about attachments such as name, size without fetching the attachment data.

Changes in public API

ImapAttachmentInfo - Represents an attachment information. ImapAttachmentInfoCollection - Represents a collection of ImapAttachmentInfo. listAttachments(int sequenceNumber) - Gets an information for each attachment in message.

Code sample

ImapMessageInfoCollection messageInfoCollection = imapClient.listMessages();

for (ImapMessageInfo message : messageInfoCollection) {
    ImapAttachmentInfoCollection attachmentInfoCollection =
            imapClient.listAttachments(message.getSequenceNumber());

    for (ImapAttachmentInfo attachmentInfo : attachmentInfoCollection) {
        System.out.println(
                "Attachment: " + attachmentInfo.getName() + " (size: " + attachmentInfo.getSize() + ")");
    }
}