We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Filtering of mail account

Hi Support,

I tried filtering one mail account with 3000 Emails in it and the component took about 30 mins to filter out 50 records.
This is very slow for the application, Iam trying use Aspose Email for.
Is there any way I can boost the performance of the filter functionality.

Please note the email account will keep increasing with around 300-400 mails per day.

Hi Karthik,

Thank you for contacting Aspose support team.

It may take long time if query is not properly designed. You may please add time filter along with other filters to improve the performance. Please give a try to the following sample code and share the feedback.

ImapClient client = new ImapClient("http://exchange.domain.com/", 143, "user@domain.com", "password", SecurityOptions.None);

// Set conditions, Subject contains "Newsletter", Emails that arrived today
ImapQueryBuilder builder = new ImapQueryBuilder();
builder.Subject.Contains("Required Subject");

// Build the query and Get list of messages
MailQuery query = builder.GetQuery();
ImapMessageInfoCollection messages = client.ListMessages(query);
Console.WriteLine("Imap: " + messages.Count + " message(s) found.");

// Disconnect from IMAP

If you are using pop3Client, please use sample code here.