email client - How to duplicate an IMAP mailbox -


I would like to create an email client that can access several IMAP mailboxes. I would like a copy of all the emails for processing, what's the best way to use IMAP commands?

Now I have a script which iterates on folders, reads the flexing flags at 1: * to see if what has been read and if any previously read messages are new If you have been marked, all the fat body. The message of PeeE is not in my database, is there any better way?

There will be a better way to get the UID of all messages (UID FETCH 1: * Flags), your Compare the resultant UID list with the database and then download any message you have and delete any message you have, but not the server (for example, by removing other IMAP clients or using the web interface). This is the only reliable way to duplicate an IMAP folder, do not forget to AFAIK (and also do not forget the UIDVALIDITY in the account!)

If your IPAP client is reaching an additional mailbox of your app, then your original method works correctly Will not do In theory, this will work fine if you can stay connected to the IMAP server continuously, you can use NOAP and IDEL to check for new and deleted messages, but it is never possible in practice - even here That GMail does not have 100% uptime: -)

A final IMAP client will combine these two approaches.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -