Aspose.Email for Java 21.5 Release Notes

All Changes

EMAILNET-40231“header doesn’t correspond to vCard format” exception when loading VCF fileBug
EMAILNET-40232Retrieving appointments from Google calendar throws exceptionsBug
EMAILNET-40223Attachments appear after saving EML messageBug
EMAILNET-40209Message header is incorrect if the subject ends with backslashBug
EMAILNET-40225Task attached to the meeting request gets converted to embedded messageBug
EMAILNET-40218Unable to retrieve content from EML fileBug
EMAILNET-40210“Object reference not set to an instance of an object.” exception when rendering specific entry of OST fileBug
EMAILNET-40189OLM processing throws System.FormatException: One of the identified items was in an invalid formatInvestigation
EMAILNET-40201Enumerating MAPI messages throws ArgumentExceptionBug
EMAILNET-40208OutOfMemory error while trying to extract a messageBug

New Enhancements

Obtaining preamble and epilogue from eml messages

The MIME format allows text (i.e. preamble) between the blank line following the headers, and the first multipart boundary and text (i.e. epilogue) between the last boundary and the end of the message. Normally this text is never visible in mail readers. However, some MIME implementations use this space to insert a note for recipients who read the message using non-MIME-compliant programs.

We have added appropriate properties to the MailMessage:

// Gets or sets a preamble text.
public String getPreamble, setPreamble

// Gets or sets an epilogue text.
public String getEpilogue, setEpilogue

Support for multiple contacts in VCard format

We have added support for reading multiple contacts in VCard format.

Changes in public API:

// Checks whether VCard source stream contains multiple contacts.
VCardContact.isMultiContacts(InputStream stream)

// Loads list of all contacts from VCard file.
VCardContact.loadAsMultiple(String filePath, Charset encoding)

// Loads list of all contacts from VCard stream.
VCardContact.loadAsMultiple(InputStream stream, Charset encoding)

Code sample:

try (InputStream stream = new FileInputStream("test.vcf")) {
    if (VCardContact.isMultiContacts(stream)) {
        List<VCardContact> contacts = VCardContact.loadAsMultiple(stream, Charset.forName("utf-8"));