Browse our Products

Aspose.Email for .NET 25.2 Release Notes

All Changes

KeySummaryCategory
EMAILNET-41500Add Support for Filtering or Searching Messages in MBOX FilesFeature
EMAILNET-41517Implement methods for paginated retrieval of items from MBOX filesFeature
EMAILNET-41499PS_INTERNET_HEADERS x-ms-journal-report named property missing for PST entryBug
EMAILNET-41507Null reference exception is thrown when saving MapiCalendar with recurrence and time zonesBug
EMAILNET-41508Error accessing email folders using Microsoft Graph APIBug
EMAILNET-41506Exception when converting email to MHT with SkipInlineImages set to trueBug
EMAILNET-41504Incorrect date shift when processing EML files in GMT+2 time zoneBug
EMAILNET-41501Senders email address is incorrect format when Converting .msg to .emlBug

New Features

1. Support for Filtering or Searching Messages in MBOX Files

Aspose.Email for .NET now provides the ability to filter or search messages within MBOX files using a query. This enhancement allows developers to efficiently retrieve only the messages that match specific criteria, improving performance and usability when working with large MBOX files.

API Changes:

  • Added EnumerateMessages(MailQuery query), which returns an enumerable collection of MailMessage instances that match the specified query.
  • Added EnumerateMessageInfo(MailQuery query), which returns an enumerable collection of MboxMessageInfo instances that match the specified query.

Code Example:

using Aspose.Email.Storage.Mbox;
using Aspose.Email;

var reader = MboxStorageReader.CreateReader("input.mbox", new MboxLoadOptions());
var mqb = new MailQueryBuilder();
mqb.Subject.Contains("Project Update");
mqb.SentDate.Before(DateTime.Today);

foreach (var message in reader.EnumerateMessages(mqb.GetQuery()))
{
    Console.WriteLine("Subject: " + message.Subject);
}

2. Support for Paginated Retrieval of Messages from MBOX Files

Aspose.Email for .NET now supports paginated retrieval of messages from MBOX files. This feature allows for efficient processing of large MBOX files by retrieving messages in smaller batches, reducing memory consumption and improving performance.

API Changes:

  • Added EnumerateMessages(int startIndex, int count), which retrieves a specified number of MailMessage instances starting from a given index.
  • Added EnumerateMessageInfo(int startIndex, int count), which retrieves a specified number of MboxMessageInfo instances starting from a given index.

Code Example:

using Aspose.Email.Storage.Mbox;
using Aspose.Email;

var reader = MboxStorageReader.CreateReader("input.mbox", new MboxLoadOptions());
int startIndex = 0;
int count = 10; // Retrieve messages in batches of 10

foreach (var message in reader.EnumerateMessages(startIndex, count))
{
    Console.WriteLine("Subject: " + message.Subject);
}