Aspose.Email for Java 22.7 Release Notes

All Changes

EMAILNET-40645FetchMessages returns messages without orderEnhancement
EMAILNET-40649Mail Subject with double quotation (and other symbols) wrongly decodedBug
EMAILNET-40623EML to MHTML/PDF: Line spacing lostBug
EMAILJAVA-35077EML with TNEF contains a header with non-ascii charactersBug
EMAILJAVA-35075ArrayIndexOutOfBoundsException is thrown while reading emailBug
EMAILJAVA-35070TNEF mail throws “Offset or count were out of bounds” exeptionBug
EMAILJAVA-35071TNEF emails throws EndOfStreamException while loadingBug
EMAILJAVA-35073ArgumentOutOfRangeException is thrown while reading TNEFBug
EMAILJAVA-35074FormatException is thrown while reading TNEF mailBug
EMAILJAVA-35076ArgumentOutOfRangeException is thrown while reading emailsBug
EMAILJAVA-35069ReferenceAttachment header is corrupt exception is thrown while loading EMLBug
EMAILNET-40630System.ArgumentOutOfRangeException is thrown while saving EML to MHTMLBug
EMAILJAVA-35078Investigate what it takes to work with Atlassian SDKBug
EMAILJAVA-35081Add support to send encrypted message to multiple recipientsEnhancement

New Enhancements

Obtaining the identification info for messages received from a mailbox

Sometimes, when processing messages received from the server, it is required to get the message identification info such as UID or sequence number.

Changes in public API:

  • MailboxInfo class - Represents identification information about message in a mailbox.
    • MailboxInfo.SequenceNumber property - The sequence number of message.
    • MailboxInfo.UniqueId property - The unique id of message.
  • MailMessage.ItemId property - Represents identification information about message in a mailbox.

Code samples:

try (ImapClient client = new ImapClient(imapHost, port, emailAddress, password, securityOption)) {
    ImapMessageInfoCollection msgs = client.listMessages("INBOX");
    List<Integer> seqIds = new ArrayList<>();
    for (ImapMessageInfo msg : msgs) {
    Iterable<MailMessage> msgsViaFetch = client.fetchMessagesBySequences(seqIds);
    for (MailMessage thisMsg : msgsViaFetch) {
        System.out.println("Message ID: " + thisMsg.getItemId().getUniqueId()
                + " SequenceNumber: " + thisMsg.getItemId().getSequenceNumber()
                + " Subject: " + thisMsg.getSubject());

New API for working with Encrypted Message with X509Certificate

Changes in public API:

  • MailMessage class.
    • public MailMessage attachSignature(X509Certificate2 certificate, boolean detached)
    • public MailMessage attachSignature(X509Certificate2 certificate)
    • public X509Certificate2[] checkSignatureCert()
    • public MailMessage decrypt(X509Certificate2 certificate)
    • public MailMessage encrypt(X509Certificate2 certificate)
    • public MailMessage encrypt(X509Certificate2[] certificates)