Archived Forum Post

Index of archived forum posts


Copying an IMAP message: How to get new UID?

Jul 21 '14 at 03:51

How do I get the new UID of an IMAP email that I copied to another folder?

I tried to use [imap Search] but it seems that the search does not allow to specify an exact time. So if someone sent me two messages on the same day with the same subject, I could not distinguish between them.


Use code like this to copy and get uid:

 if (_imap.AppendMail(Mailbox, email))
                newUid = _imap.AppendUid;