Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Most reliable method to achieve mail download / sync consistency

 
Aneesh Mohan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm implementing a mail client which downloads all mails and stores them locally. Any mail deleted locally should be reflected in the online inbox and vice versa. Also if the download of mail stops before all mails are downloaded, it should resume from the stopped mail next time.

Currently I'm using a combination of message id and message uid for this but I heard it's not a reliable method for this. Can you guys suggest me any other approach ?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds pretty much like IMAP works. Which protocol are you using to access the server?
 
Aneesh Mohan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer ,
I'm using both IMAP and POP3 and in both the protocols, I'm following the message-id approach. Is this the only approach applicable to IMAP ?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using both IMAP and POP3 and in both the protocols

This sounds odd. POP has no concept of synchronization, so you're bound to run into problems, especially if you also (or variously) use IMAP.
 
Aneesh Mohan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:
I'm using both IMAP and POP3 and in both the protocols

This sounds odd. POP has no concept of synchronization, so you're bound to run into problems, especially if you also (or variously) use IMAP.



Ok I should mention that POP3 is there as fallback for certain sites which only support POP3 ( like Outlook) . I don't use sync here but I do use message-id to identify messages.
But with IMAP as I said, message-id is being used.
Suppose I have a fully sync list of mails in my local machine. Now, If I delete a mail in the inbox, how can I identify this event so that I can also delete the local copy automatically? Is it just a matter of comparing the message-uids of local and server mails and delete whatever is missing in the server?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic