Archived Forum Post

Index of archived forum posts


Setting "Deleted" Flag does not remove email from IMAP mailbox?

May 04 '16 at 08:19

I hope you can help with a minor problem I have with IMAP component.
I am running this code:

success = imap.SetMailFlag(email, "Deleted",1);

But, when I am quering for new messages, the mail is still received. This happens until I log into the web interface of my mail provider ( After login, the message is no longer retrieved when I query.

Should I do something else than disconnect after calling the SetMailFlag? Flush cache or similar?


Setting the "Deleted" flag does not remove the email from the mailbox. Emails marked "Deleted" are removed when the Expunge method is called.