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.SelectMailbox();
imap1.MessageSet = messageIndex.ToString();
imap1.Mailbox = "\"NewMailbox\"";
imap1.MoveToMailbox();
// Remove all message marked with "\Deleted" flag
imap1.ExpungeMailbox();
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.