Aspose.Email for .NET 23.5 Release Notes

All Changes

EMAILNET-40926Add Appoinment.Version propertyEnhancement
EMAILNET-40987VCardSaveOptions RequestEnhancement
EMAILNET-40709Add overloads for TgzReader Constructor and method GetTotalItemsCountEnhancement
EMAILNET-41030Problem with creating folder hierarchy in pstEnhancement
EMAILNET-41074not able to Load Attach fileBug
EMAILNET-41061High memory usage while sending/receiving messages usign smtp/imap clientBug
EMAILNET-41056Custom headers not fetched via GraphClientBug
EMAILNET-41054‘On behalf’ does not work correctlyBug
EMAILNET-41047Custom header not rendered in MHTBug
EMAILNET-41060MSG to MHTML: Incorrect styling and formattingBug
EMAILNET-41051Exception in Appointment from Mapi to IcsBug
EMAILNET-41046System.NullReferenceException raised when save vcf to msgBug

New Enhancements

Adding the Appointment.Version property

The Appointment class now includes a Version property, which enables users to retrieve the version of their ICS/VCS files. This property assists to determine which version their files are based on, ensuring integration with other systems and apps.

Code sample:

var app = Appointment.Load("meeting.ics");

if (app.Version == 1.0)
    // do something

Adding the VCardSaveOptions

We added the new class to our API: VCardSaveOptions. This class enhances the capabilities of VCard contact management, allowing users to customize the saving behavior when working with vCard files.

VCardSaveOptions class has the following properties:

  • VCardVersion - enables users to specify the desired vCard version when saving contact items. By default, the class is set to use vCard version 2.1 (VCardVersion.V21).

  • UseExtensions - allows users to control whether extended fields can be used when saving vCard files. When set to true (default), extensions are permitted, providing compatibility with custom fields and additional contact information.

  • PreferredTextEncoding - the encoding to be used when saving vCard contact items.

Code sample:

var cont = VCardContact.Load(fileName, Encoding.UTF8);
var opt = new VCardSaveOptions();
opt.PreferredTextEncoding = Encoding.UTF8;
cont.Save("my.vcard", opt);

Adding GetTotalItemsCount method to TgzReader class

We have added the GetTotalItemsCount() method to TgzReader class. It returns the total number of message items contained in the storage.

Code sample:

using (TgzReader reader = new TgzReader(fileName))
    int count = reader.GetTotalItemsCount();

Retrieve a PST subfolder by path

The FolderInfo.GetSubFolder(string name, bool ignoreCase, bool handlePathSeparator) method overload was added. It retrieves a subfolder with the specified name from the current PST folder.

It has the following parameters:

  • nameparameter specifies the name of the subfolder to retrieve.
  • ignoreCase parameter determines whether the search for the subfolder name should be case-sensitive or case-insensitive. If set to true, the search will be case-insensitive, otherwise, it will be case-sensitive.
  • handlePathSeparator parameter specifies whether the specified folder name should be treated as a path if it contains backslashes. If set to true, the method will interpret the folder name as a path, attempting to navigate to the subfolder using the path. If set to false, the method will treat the folder name as a simple name, searching for a subfolder with an exact name match.

Code sample:

var folder = pst.RootFolder.GetSubFolder(@"Inbox\Reports\Jan", true, true);

In this sample, the method will return a ‘Jan’ named folder that is located at the Inbox\Reports\ path relative to the root folder.