I am creating a small application to download messages from the POP3 server using the javax.mail library, I Checking to save new messages I downloaded the last message date from Pop 3, but I get a problem with the similar () function: if I get the message (). In the length, I always get 0 if there is no new message, so I can not download old messages again.
For example, my code is:
Pop3store = (POP3Store) pop3Session.getStore ("pop3"); Pop3Store.connect (cPOP3HostName, aPOP3UserName, aPOP3 password); Pop3folder = (POP3 Folder) pop3Store.getFolder ("Inbox"); Pop3Folder.open (2); Message = pop3 folder. Metsges (); (Int index = 0; index and lieutenant; message lang; index ++) {.... // date check for message [index]}
I get a message is. Length> 0 Only if I get new messages on my POP3 server, I can not download the same message twice.
Do you have any ideas? I'm trying to use Gmail as a pop3 server for my code.
I hope that my problem is being understood, thanks to everyone
Regards Luca
I have solved using Gmail's pop3settings 1) Disabling pop3 2) Pop 3 settings to download all messages
Comments
Post a Comment