Browse our Products

Aspose.Email for .NET 24.11 Release Notes

All Changes

KeySummaryCategory
EMAILNET-41465Improve the MapiAttachmentCollection.Add method to add reference attachmentsEnhancement
EMAILNET-41466Add an overloaded versions of FolderInfo.EnumerateMapiMessages method to enhance message search functionalityEnhancement
EMAILNET-41464Create a MapiAttachment property to identify a reference attachmentEnhancement
EMAILNET-41462Add support to customize the base URL of the SendGridEnhancement
EMAILNET-41457GraphClient support of GCC High endpointsEnhancement
EMAILNET-41446Iissue when trying to update emails within PST filesBug
EMAILNET-41460TO field parsing in EML fails due to special characterBug
EMAILNET-41449GraphClient updatemessage for existing message PATCH request contains complete documentBug

New Features and Enhancements

Improved MapiAttachmentCollection.Add Method to Support Reference Attachments

The MapiAttachmentCollection.Add method now includes a new overload to add reference attachments. A new ReferenceAttachmentOptions class has been introduced to define reference attachment properties.

Code Example:

var options = new ReferenceAttachmentOptions(
    "https://drive.google.com/file/d/1HJ-M3F2qq1oRrTZ2GZhUdErJNy2CT3DF/",
    "https://drive.google.com/drive/my-drive",
    "GoogleDrive");

// Add reference attachment
msg.Attachments.Add("Document.pdf", options);

New Property to Identify Reference Attachments

The MapiAttachment class now includes the IsReference property, enabling developers to identify reference attachments in a message.

Code Example:

foreach (var attachment in msg.Attachments)
{
    if (attachment.IsReference)
    {
        // Process reference attachment
    }
}

Enhanced FolderInfo.EnumerateMapiMessages Methods

New overloaded methods in the FolderInfo class enhance message search and retrieval capabilities:

  • IEnumerable<MessageInfo> EnumerateMessages(MailQuery mailQuery) - Filter messages using a MailQuery.
  • IEnumerable<MessageInfo> EnumerateMessages(MessageKind kind) - Retrieve messages by type (MessageKind).
  • IEnumerable<MessageInfo> EnumerateMessages(int startIndex, int count) - Paginate message retrieval using a starting index and count.

Support for Customizing SendGrid Base URL

You can now customize the base URL for the SendGrid client through the SendGridRegion enumeration and related properties in the SendGridClientOptions class.

Code Example:

SendGridClientOptions opt = new SendGridClientOptions() 
{ 
    ApiKey = "YourApiKey", 
    Region = SendGridRegion.EU 
};
IDeliveryServiceClient client = DeliveryServiceClientFactory.Get(opt);
client.EndPoint = "https://api.eu.sendgrid.com";

Added Support for GCC High Endpoints in GraphClient

GraphClient now supports EndPoint property to connect to GCC High O365 endpoints.

Code Example:

client.EndPoint = "https://graph.microsoft.us";

var folders = client.ListFolders();
string folderId = folders.Find(x => x.DisplayName == "Inbox").ItemId;
var msgs = client.ListMessages(folderId);