Browse our Products

Aspose.Email for .NET 25.12 Release Notes

All Changes

KeySummaryCategory
EMAILNET-41572Implement batch update support for message read/unread flags in PSTFeature
EMAILNET-40762Save MapiContact contacts to vCard 3.0 and vCard 4.0Feature
EMAILNET-41120Extract Tasks from .tgz fileEnhancement
EMAILNET-41676ContentId no longer auto-generated for MHT AlternateViews/Attachments since 25.7Enhancement
EMAILNET-41674Add Aspose.Email.DKIM.Verify method for MailMessage verificationFeature
EMAILNET-41665FormatException when decoding malformed Base64 subject header containing misplaced period in encoded-wordEnhancement

New Features

Batch Update of Message Read/Unread Flags in PST Files

You can now set the read status for multiple messages in a PST file with a single call, improving performance when processing large mailboxes. This batch operation works on any list of message entry IDs you provide.

Public API Changes:

  • Aspose.Email.Storage.Pst.FolderInfo.SetReadStatus(IList messageEntryIds, bool isRead) – Sets or clears the Read status for the specified messages in a PST file.

Code Example:

PersonalStorage pst = PersonalStorage.FromFile("source.pst");
FolderInfo folder = pst.RootFolder.GetSubFolder("Inbox");
IList<string> idsForProcessing = new List<string>();

foreach (var id in folder.EnumerateMessagesEntryId())
{
    idsForProcessing.Add(id);
}

// Mark messages as unread.            
folder.SetReadStatus(idsForProcessing, false);

Saving MapiContact to vCard 3.0 and 4.0

MapiContact objects can now be exported directly to the latest vCard standards, giving you compatibility with modern contact applications. Choose between vCard 3.0 and the newer vCard 4.0 when saving.

Public API Changes:

  • Aspose.Email.PersonalInfo.VCard.VCardVersion.V40 – vCard version 4.0

Code Example:

MapiContact contact = new MapiContact();
contact.PersonalInfo.Children = new string[] { "child 1", "child 2" };
contact.PersonalInfo.Hobbies = "Hobies";
contact.PersonalInfo.Notes = "Notes";
contact.Save(testFileName, new VCardSaveOptions() { Version = VCardVersion.V40 });

Extract Tasks from .tgz Archives

Tasks embedded in a .tgz archive can now be extracted and saved as .ics files, automatically placing them into the appropriate folder. This streamlines migration of task data from compressed archives.

Code Example:

using (TgzReader reader = new TgzReader("ZimbraSample.tgz"))
{
    reader.ExportTo(outputDir);
}

ContentId No Longer Auto-Generated for MHT AlternateViews/Attachments

Starting with version 25.12, the library stops automatically generating ContentId values for MHT alternate views and attachments. Use the new UniqueId property to reference these parts consistently.

Code Example:

foreach(var alternateView in mailMessage.AlternateViews)
{
    var alternateViewId = alternateView.UniqueId;
}

DKIM Verification Support for MailMessage

The library now includes DKIM verification methods, allowing you to validate the authenticity of incoming email messages.

Public API Changes:

  • Aspose.Email.DKIM.DkimVerifier.Verify(Stream mimeStream) – Verifies DKIM signature of the MIME stream.
  • Aspose.Email.DKIM.DkimVerifier.Verify(string mimeFilePath) – Verifies DKIM signature of the MIME file.
  • Aspose.Email.DKIM.DkimResult – DKIM signature verification result.

Code Example:

var result = DkimVerifier.Verify("test.eml");
var isValid = result.IsValid;