Browse our Products

Aspose.Email for .NET 24.5 Release Notes

All Changes

EMAILNET-41346Get message recipients from PST by entry idFeature
EMAILNET-41316Recovery of soft deleted items in local PST and OST filesFeature
EMAILNET-41341Convert multi contact Vcf to MapiDistributionListFeature
EMAILNET-41342Wrong sent date saved while saving the message as .msg from mboxEnhancement
EMAILNET-41252InvalidCastException trying to replace an attachment’s ContentStreamBug
EMAILNET-41310Not able to read events from ICS fileBug
EMAILNET-41339Cannot create a calendar item in a non-calendar folderBug

New Features

Extract Message Recipients from PST

A feature has been introduced that allows recipients to be extracted from PST files using a message entry ID. This feature is available in the PersonalStorage class.

Recipients Extracted by Entry ID:

Method: MapiRecipientCollection ExtractRecipients(string entryId)

Code example:

using (var pst = PersonalStorage.FromFile(fileName))
    // Recipients are extracted using the entry ID
    var recipients = pst.ExtractRecipients("AAAAADzSMygQQFJOkKwVhb8v5EUkASAA");

Recipients Extracted from Message Info:

Method: MapiRecipientCollection ExtractRecipients(MessageInfo messageInfo)

Code example:

using (var pst = PersonalStorage.FromFile(fileName))
    // The "Inbox" folder is obtained
    var folder = pst.RootFolder.GetSubfolder("Inbox");

    // Each message in the "Inbox" folder is iterated
    foreach (var messageInfo in folder.EnumerateMessages())
        // Recipients are extracted from each message
        var recipients = pst.ExtractRecipients(messageInfo);

2. Soft Deleted Items Recovered in Local PST and OST Files

A method to recover soft deleted items from local PST and OST files has been provided. This is implemented via the PersonalStorage class.

Method: IList<RestoredItemEntry> FindAndExtractSoftDeletedItems()

Code example:

using (var pst = PersonalStorage.FromFile(fileName))
    // Soft deleted items are found and extracted
    var entries = pst.FindAndExtractSoftDeletedItems();

    // The recovered items are iterated through
    for (var index = 0; index < entries.Count; index++)
        // Folder information is obtained by ID
        var folderInfo = pst.GetFolderById(entries[index].FolderId);

        // A directory for the folder is created if it doesn't exist
        if (!Directory.Exists(folderInfo.DisplayName))
            Directory.CreateDirectory(Path.Combine(path, folderInfo.DisplayName));
        // The restored item is obtained
        var msg = entries[index].Item;
        // The restored item is saved as a .msg file
        msg.Save(Path.Combine(path, folderInfo.DisplayName, $"{index}.msg"));

3. Multi-Contact VCF Converted to MapiDistributionList

Support has been added for converting multi-contact VCF files into MapiDistributionList objects. This can be done using the following static methods in the MapiDistributionList class.


  • static MapiDistributionList FromVCF(string filePath)
  • static MapiDistributionList FromVCF(Stream stream)

Code example:

// A multi-contact VCF file is converted to a MapiDistributionList
MapiDistributionList dlist = MapiDistributionList.FromVCF(fileName);