Aspose.Email for .NET 23.8 Release Notes

All Changes

EMAILNET-40968Save Mapi DistList to a single multi contact vcf fileFeature
EMAILNET-39878Support for MailMessage overload in sending message GraphClientFeature
EMAILNET-41079Improve message validationEnhancement
EMAILNET-40870Add option to seach and fill sender SMTP address in EMLEnhancement
EMAILNET-41125System.ArgumentNullException when processing certain emailsBug
EMAILNET-41140System.NotSupportedException : No data is available for encoding 4024Bug
EMAILNET-41126Problems with WebDav/Vcf conversionBug
EMAILNET-41117Does not match the container classBug
EMAILNET-41107ImapClient.ListMessages returns fake ImapMessageInfoBug

New Features

Support for MailMessage Overload in Sending Message via GraphClient

We have added support for overloaded methods that accept a MailMessage object for sending emails.

The following methods have been added to the GraphClient class:

  • MailMessage CreateMessage(string folderId, MailMessage message): This method allows you to create a new MailMessage object in the specified folder. You can provide the folderId and the MailMessage object as parameters. The method will return the created MailMessage object.

  • void Send(MailMessage message): This method allows you to send the specified MailMessage object. You can pass the MailMessage object as a parameter to send it.

These new overloaded methods provide you with more flexibility and ease in handling email operations using the GraphClient. You can now easily create and send emails using the MailMessage object without needing to perform additional conversions or transformations.

Code sample:

var eml = new MailMessage
    From = "",
    To = ",",
    Subject = "New message",
    HtmlBody = "<html><body>This is the HTML body</body></html>"

graphClient.Create(KnownFolders.Inbox, eml);

Save Mapi Distribution List to a Single Multi Contact VCF File

To save a Mapi Distribution List to a multi-contact VCF file, the following method has been added:

  • void Save(string fileName, MapiDistributionListSaveOptions options): This method allows you to save the Mapi Distribution List to a specified file name using the provided save options. You can provide the file name and an instance of the MapiDistributionListSaveOptions class as parameters.

The MapiDistributionListSaveOptions class contains options for saving the Mapi Distribution List. In this case, you can specify the save format as VCard (ContactSaveFormat.VCard) to save the distribution list as a multi-contact VCF file.

Here is a sample code snippet that demonstrates how to save a distribution list to a multi-contact VCF file:

var dlist = (MapiDistributionList)msg.ToMapiMessageItem();
var options = new MapiDistributionListSaveOptions(ContactSaveFormat.VCard);
dlist.Save("distribution_list.vcf", options);