Aspose.Email for .NET 22.3 Release Notes

All Changes

KeySummaryCategory
EMAILNET-40547Add feature to set the X-ALT-DESC header in ICS fileEnhancement
EMAILNET-40525Performance issue while reading attachment detail with size 5MB using IMAP APIEnhancement
EMAILNET-40543EWSClient.FetchItem throws “System.ArgumentException The property data could not be null”Enhancement
EMAILNET-40540Issue with fetched message using GraphClient as .msg with attachments and embedded imagesBug
EMAILNET-40548Aspose.Email.Clients.Exchange.WebService - System.ObjectDisposedException: Cannot access a disposed objectBug
EMAILNET-40553InvalidOperationException is thrown while loading EML fileBug
EMAILNET-40516.NET 6.0 and PublishReadyToRun failureBug
EMAILNET-40545MapiMessage to MailMessage: Sender property from MailMessage gets null valueBug
EMAILNET-40559MapiCalendarExceptionInfo returns null body field when MapiCalendar is loaded from PST fileBug
EMAILNET-40558MapiCalendarExceptionInfo Attachments returns null when MapiCalendar is loaded from PST fileBug
EMAILNET-40549License.SetLicense throws System.InvalidOperationExceptionBug
EMAILNET-40557Messages extracted from PST file can’t open in Outlook 2016Bug

New Features

Set the X-ALT-DESC header in ICS file

The X-ALT-DESC header is a HTML formatted description in iCalendar (.ics) items. To create an appointment with HTML content, set the IsDescriptionHtml property to true.

Code sample

var appointment = new Appointment("Bygget 83",
    DateTime.UtcNow, // start date
    DateTime.UtcNow.AddHours(1), // end date
    new MailAddress("TintinStrom@from.com", "Tintin Strom"), // organizer
    new MailAddress("AinaMartensson@to.com", "Aina Martensson")) // attendee
{
    IsDescriptionHtml = true,

    Description = @"
      <html>
       <style type=""text/css"">
        .text {
               font-family:'Comic Sans MS';
               font-size:16px;
              }
       </style>
      <body>
       <p class=""text"">Hi, I'm happy to invite you to our party.</p>
      </body>
      </html>"
};

List the message attachments using the IMAP client

A feature has been added to get information about attachments such as name, size without fetching the attachment data.

Changes in public API

Aspose.Email.Clients.Imap.ImapAttachmentInfo - Represents an attachment information. Aspose.Email.Clients.Imap.ImapAttachmentInfoCollection - Represents a collection of ImapAttachmentInfo. Aspose.Email.Clients.Imap.ListAttachments(int sequenceNumber) - Gets an information for each attachment in message.

Code sample

var messageInfoCollection = imapClient.ListMessages();
    
foreach (var message in messageInfoCollection)
{
    var attachmentInfoCollection = imapClient.ListAttachments(message.SequenceNumber);

    foreach (var attachmentInfo in attachmentInfoCollection)
    {
        Console.WriteLine("Attachment: {0} (size: {1})", attachmentInfo.Name, attachmentInfo.Size);
    }
}

Fetching items with attachments via EwsClient

We added the FetchItems(EwsFetchItems options) method to EwsClient. It accepts an instance of EwsFetchItems class as a parameter to control the behavior of the method.

For example, the following code shows how to get items with attachments.

Code sample

var messageInfoList = ewsClient.ListMessages(ewsClient.MailboxInfo.InboxUri);
var options = EwsFetchItems.Create();
var uriList = messageInfoList.Select(item => item.UniqueUri).ToList();
var items = ewsClient.FetchItems(options.AddUris(uriList).WithAttachments());