0 votes

Hello,

I want to update existing email. I have UID of email. I have referred few link and I found this.

        var eml = imap.GetMessageByUID(uid);
        IMail email = new MailBuilder().CreateFromEml(eml);
            //update whatever you want in "email"
        if (email.Attachments.Count > 0)   //remove attachements
            email.RemoveAttachments();
        imap.UploadMessage(email);
            imap.DeleteMessageByUID(uid);

Will this update email of provided uid or it will delete message and upload new email with new uid?

by (3.0k points)

1 Answer

0 votes

This will delete a previous message and upload a new one.

There is no way to update/modify existing email message on the IMAP server.

by (301k points)
...