0 votes

Hi,

I have created a local copy of the emails in a database. using the tutorial of how to get the new emails from IMAP. but then if the user moves an email to a different folder or delete's it how can I use Mail.dll to get an update of these changes so I can make them to my local data set. without having to list out all of the items using GetAll() and cross check them.

Thanks
Phil

by (350 points)

1 Answer

0 votes

There is no magic feature in IMAP protocol that will synchronize changes made on IMAP server to your local database. Some servers report most changes when you use IDLE, however some don't. Please also have in mind that while you are offline/not connected changes may happen.

Use GetAll method, remember to check FolderStatus.UIDValidity.

Generally speaking Imap.GetAll is rather fast, so you shouldn't have much problems with that.

by (297k points)
...