Aspose.Email for .NET 20.12 Release Notes

All Changes

KeySummaryCategory
EMAILNET-40001Support to validate SMTP connection credentialsFeature
EMAILNET-40000Support for Time Format and TimeZone setting in HTMLSaveoptionsFeature
EMAILNET-40008Yearly Recurrence Not Finding All InstancesBug
EMAILNET-40013Missing Attachments Info on Printed MSGBug
EMAILNET-39978Aspose email gives an error but we do not understand what is wrongBug
EMAILNET-39980Cancel Appointment OutlookBug
EMAILNET-39997After Save extracted email having the margin issue in AsposeBug
EMAILNET-39982Possible Memory leak when running Aspose Email 20.10 via threadBug

New Features

Validate Mail Server Credentials Without Sending Email

Sometimes it is necessary to verify credentials without sending an email. Aspose.Email now supports this feature. The ValidateCredentials() method was added to ImapClient, Pop3Client and SmtpClient for this purpose.

Code sample:

using (ImapClient client = new ImapClient(server.ImapUrl, server.ImapPort, "username", "password", SecurityOptions.Auto))
{
    client.Timeout = 4000;
   
    if (client.ValidateCredentials())
    {
        //to do something
    }
}

using (SmtpClient client = new SmtpClient(server.SmtpUrl, server.SmtpPort, "username", "password", SecurityOptions.Auto))
{
    client.Timeout = 4000;
   
    if (client.ValidateCredentials())
    {
        //to do something
    }
}

using (Pop3Client client = new Pop3Client(server.Pop3Url, server.Pop3Port, "userName", "password", SecurityOptions.Auto))
{
    client.Timeout = 4000;
   
    if (client.ValidateCredentials())
    {
        //to do something
    }
}

Time Format and TimeZone Setting in HTMLSaveoptions

Now you can set the time and timezone display formats in HTMLSaveoptions.

The following API has been added:

  • HeadersFormattingOptions - Allows to specify headers formatting options when saving MailMessage to Mhtml or Html format.
  • HtmlFormatOptions.RenderCalendarEvent - Indicates that text from calendar event should be written in output html.
  • HtmlFormatOptions.RenderVCardInfo - Indicates that text from VCard AlternativeView should be written in output html.

Code sample:

MailMessage msg = MailMessage.Load(fileName);
HtmlSaveOptions options = new HtmlSaveOptions();
options.HtmlFormatOptions = HtmlFormatOptions.WriteHeader;
options.FormatTemplates[MhtTemplateName.DateTime] = "MM d yyyy HH:mm tt";