ImapClient.DeleteMessage not deleting message

Using Aspose.Email 5.9


No exceptions thrown, it just doesn’t delete the message. Also adding/changing message flags doesn’t appear to be working.

Do you know of any circumstance that might cause this?

EDIT: This happens on gmail as well as an IceWarp server.

EDIT2: client.SelectFolder was being passed a true for readOnly. Problem sorted.

Thanks
Mat@C2S

Hi Mat,


Thank you for writing to Aspose support team.

I tried the scenario using Aspose,Email for ,NET 6.1.0 by deleting the selected messages. If I run the code again, it does not retrieve the previously deleted messages. This shows that messages are marked as deleted on server, that is why these are not extracted by Aspose.Email.

On the other hand, if I search the same mails using Outlook or web browser client, the messages are visible. It is an expected behavior as mentioned here and hence not an issue with Aspose.Email. Please review this article and share your feedback with us.