+1 vote

With IMAP, is there a way to move an email to a different folder by change the subject?

by

1 Answer

0 votes
 
Best answer

No, I have never heard of such IMAP feature.

You need to use Imap.MoveByUID method to move message to a different IMAP folder.

using (Imap imap = new Imap())
{
    imap.Connect("imap.example.com");   // or ConnectSSL for SSL
    imap.UseBestLogin("user", "password");

    imap.SelectInbox();
    List<long> uids = imap.Search(Flag.Seen);
    foreach (long uid in uids)
    {
        imap.MoveByUID(uid, "INBOX/Folder1");
    }
    imap.Close();
}
by (297k points)
...