开发者

IMAP Client Sync local messages Server?

What's the best general technique for creating an IMAP client and keeping its local message store in sync with the server?

I guess I'm looking for the right way to figure out what's changed in an IMAP folder on the server since the last time I开发者_JS百科 checked, and download those changes, to persist them to my local database... This would include messages no longer in the folder (deleted or moved), new messages, and changed messages...

I guess new messages is easy, I can grab the highest UID i have for a folder and then find messages since that UID. I'm not so sure about detecting messages that were deleted or moved though, or changed (maybe some flags changed on a message).

Thanks!


For sync, probably you need each folder all messages UID and flags. You can compare local cached UIDs to server returned, with this you can dedect new messages and deleted(

Probably you should use some kind of hastable for search/compare, this will speed up all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜