Aspose.Email for .NET 21.7 Release Notes

All Changes

EMAILNET-40250Using CRAM-MD5 authentification with ImapClientFeature
EMAILNET-40256Newest API for SmtpClientFeature
EMAILNET-40326Encoding options for MboxrdStorageReader classEnhancement
EMAILNET-40310Appointment Sub Type is missing when load modified occurrences(embedded message)Enhancement
EMAILNET-40328HTML default header formating optionsEnhancement
EMAILNET-40280Reading Importance and Class properties from ICS fileEnhancement
EMAILNET-40306Embedded message does not get updatedBug
EMAILNET-40309Body text is missing in exported MHTBug
EMAILNET-40327Regressions: NullPointerException when calling MailMessageBug
EMAILNET-40293EML attachments lost while saving mails to Office 365 folderBug
EMAILNET-40291Messages differ after saving and loading TnefBug
EMAILNET-40279MapiCalendar cannot get some event’s recurrence periodBug
EMAILNET-40304Unable to investigate all contactsBug
EMAILNET-40315MapiCalendar recurrence pattern process is stuckBug
EMAILNET-40316Exception on removing the signature from emailBug

New Features

Added CRAM-MD5 authentication

The ability to authenticate using the CRAM-MD5 mechanism in IMAP, POP3, and SMTP clients has been added. The following code samples show how to use this feature.

IMAP client:

imapClient.AllowedAuthentication = ImapKnownAuthenticationType.CramMD5;

POP3 client:

popClient.AllowedAuthentication = Pop3KnownAuthenticationType.CramMD5;

SMTP client:

smtpClient.AllowedAuthentication = SmtpKnownAuthenticationType.CramMD5;

Cancelation for asynchronous operations

For asynchronous methods of mail clients, overloads have been added with the additional CancellationToken parameter. This allows canceling an asynchronous operation as shown in the code snippet for an ImapClient.

CancellationTokenSource tokenSource = new CancellationTokenSource();
AppendMessagesResult appendMessagesResult = null;
AutoResetEvent autoResetEvent = new AutoResetEvent(false);
ThreadPool.QueueUserWorkItem(delegate(object state)
            appendMessagesResult = imapClient.AppendMessagesAsync(mmList, tokenSource.Token).GetAwaiter().GetResult();
        catch (Exception ex)



Encoding option for MboxrdStorageReader class

We have added the ability to set preferred text encoding when loading Mbox files for reading.

var reader = new MboxrdStorageReader("sample.mbox", new MboxLoadOptions() { PreferredTextEncoding = Encoding.UTF8});
var message = reader.ReadNextMessage();

Using the global formatting options for the Mht header

The global options set the common formatting of an Mht header for all MhtSaveOptions instances. This is to avoid setting formatting for each instance of MhtSaveOptions.

GlobalFormattingOptions.PageHeaderFormat = "SomePageHeaderFormat";
GlobalFormattingOptions.HeaderFormat = "SomeHeaderFormat";
GlobalFormattingOptions.BeforeHeadersFormat = "SomeBeforeHeadersFormat";
GlobalFormattingOptions.AfterHeadersFormat = "SomeAfterHeadersFormat";

// saveOptions1 and saveOptions2 have the same mht header formatting
MhtSaveOptions saveOptions1 = new MhtSaveOptions();
MhtSaveOptions saveOptions2 = new MhtSaveOptions();