PHP Classes

get Unread emails

Recommend this page to a friend!

      POP3 e-mail client  >  POP3 e-mail client package blog  >  How Can PHP Read Emai...  >  All threads  >  get Unread emails  >  (Un) Subscribe thread alerts  
Subject:get Unread emails
Summary:i want to get unread emails.
Messages:2
Author:abdul
Date:2013-07-23 07:41:04
Update:2013-07-23 08:23:29
 

  1. get Unread emails   Reply   Report abuse  
Picture of abdul abdul - 2013-07-23 07:41:04
i want only unread emails.

  2. Re: get Unread emails   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2013-07-23 08:23:29 - In reply to message 1 from abdul
In POP3 there is no concept of unread emails. Usually you pull all the messages and delete them, so all new messages are considered unread.

Some mail servers may change the Status header of each message to mark it as read when the message is fully retrieved. You may try to check that header but it is not guaranteed that your mail server works that way.

If you really need to keep messages in the POP3 server, instead of deleting them, maybe it is better that your application keeps track of message read status in a database table that associates message identifiers with the read status. So all new messages not recorded in that database will be considered unread.