Page 1 of 1

Count unread emails via POP3?

Posted: Sun Oct 19, 2008 2:07 pm
by DaveTheAve
So I'm using this class that will count the amount of email in the pop3 server but the problem is, not all emails in the pop3 account are new (unread).

My question is how do I tell if an email is read or not on a pop3 server?

Re: Count unread emails via POP3?

Posted: Sun Oct 19, 2008 4:35 pm
by VladSun
Open a connection to the POP3 server and implement POP3 protocol:
http://en.wikipedia.org/wiki/Post_Offic ... og_example

Re: Count unread emails via POP3?

Posted: Sun Oct 19, 2008 5:07 pm
by alex.barylski
Use the IMAP API to connect to a pop3 server and read messages:

Code: Select all

$imap = imap_open ("{domain.com:110/pop3}INBOX", "user", "pass")
http://ca3.php.net/manual/en/ref.imap.php