Aspose.Email for .NET 22.2 Release Notes

All Changes

EMAILNET-40522Converted PST files from EML does not display reference attachments attached to the emailsEnhancement
EMAILNET-40491Retrieving message class from ExchangeMessageInfo objectEnhancement
EMAILNET-40544Handling TNEF mail issue with plain-text bodyBug
EMAILNET-40531SmtpClient.Send throws Exception “The handshake failed due to an unexpected packet format”Bug
EMAILNET-40537Extracted Metadata FROM is different as it is in OutlookBug
EMAILNET-40526System.OutOfMemoryException: when converting a nested message from msg fileBug
EMAILNET-40530MapiMessage.FromMailMessage() returns null sender email addressBug

New Features

Support for the reference attachments

A reference attachment is an alternative to the local file attachment. In some cases, reference attachments may be preferable, for example, if you want to manage its access.

Changes in public API

Aspose.Email.ReferenceAttachment - represents a reference attachment. Aspose.Email.AttachmentPermissionType - The permission type data associated with a web reference attachment. Aspose.Email.AttachmentProviderType - The type of web service manipulating the attachment.

Code sample

var eml = MailMessage.Load("fileName");

var refAttach = new ReferenceAttachment("https://[attach_uri]")
    Name = "Document.docx",
    ProviderType = AttachmentProviderType.OneDrivePro,
    PermissionType = AttachmentPermissionType.AnyoneCanEdit


Retrieving message class from ExchangeMessageInfo object

We have added MessageClass property to ExchangeMessageInfo class.

Code sample

using (var client = EWSClient.GetEWSClient(uri, credentials))
    var messageInfoCollection = client.ListMessagesFromPublicFolder(publicFolder);

    foreach (var messageInfo in messageInfoCollection)
        Console.WriteLine("Message Class: {0}", messageInfo.MessageClass);