IMAP moved message not being deleted.
Depending on server settings, this may happen at a predetermined time interval, when the user logs off, or not at all. In this case, the ExpungeMailbox method can be used to force the mailbox to be expunged.
imap1.Mailbox = "\"INBOX\"";
imap1.MessageSet = messageIndex.ToString();
imap1.Mailbox = "\"NewMailbox\"";
// Remove all message marked with "\Deleted" flag
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at firstname.lastname@example.org.