Reading only unread emails.
1 posts in topic
Flat View  Flat View

Posted By:   vishnu_kal
Posted On:   Monday, August 5, 2002 08:27 AM

How do I read only already unread emails from POP3.
I do not want to delete the already read emails either.

Re: Reading only unread emails.

Posted By:   Christopher_Koenigsberg  
Posted On:   Monday, August 5, 2002 10:38 AM

As far as I know, you need to compare the messages on the server, with your database of messages that you have already read. Many POP clients use an optional "UIDL" header for this purpose, using these UIDL's as the key for their database of what messages have been read.

You might also use an optional "Status" header, which some POP clients also use. If a message does not have these headers on it, you'll have to add them yourself, and you'll have to change the content of this header yourself too, as far as I know (and then save the modified message back to the server again).

Looking quickly in the jguru JavaMail tutorial in a discussion on message "flags" it says that they are not supported under POP3, and "Checking for new mail is not a POP task but one built into mail clients."...

About | Sitemap | Contact