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

Free Support Forum - aspose.com

POP3: Delete does not work anymore

I tried to updated Aspose Email 5.8.0.0 to a newer version.
But at every newer version I tried deleting messages doesn't work any more. I use pop3client.DeleteMessage(pop3MessageInfo.UniqueId) for delete.
I tested this with Exchange and Gmail.

Hi Ulrich,

Thank you for contacting Aspose Support team.

We have tested this issue at our end using the latest version of the API and following code sample. The messages are deleted and it shows zero emails in the inbox when listed again. It seems, though, that the server doesn’t delete them immediately and some time may be required to delete them. API’s behavior is as expected and we don’t consider this as a bug.

Sample Code:

Pop3Client pop3Client = new Pop3Client(“[pop.gmail.com](http://pop.gmail.com/)”, 995, “username”, “password1234”);

pop3Client.SecurityOptions = SecurityOptions.Auto;

Pop3MessageInfoCollection msgsColl = pop3Client.ListMessages();

Console.WriteLine(“Messages in the Inbox:” + msgsColl.Count);

foreach (Pop3MessageInfo msgInfo in msgsColl)

pop3Client.DeleteMessage(msgInfo.UniqueId);

// Commit delete

pop3Client.CommitDeletes();

Thread.Sleep(10 * 1000);

msgsColl = pop3Client.ListMessages();

Console.WriteLine(“Messages in the Inbox:” + msgsColl.Count);

In my code CommitDeletes was missing. Now it is working.

In version 5.8.0.0 delete was working without commit. Where do I find such API changes in general?

Hi Ulrich,


Thank you for writing back to us. All the API changes are mentioned in our Public API Changes section of Aspose.Email documentation. It is updated with every release of the API with all the changes that are part of the release. Please check these and let us know if we can be of any additional help to you in this regard.