PHP Classes

only new emails on pop3 class

Recommend this page to a friend!

      POP3 e-mail client  >  All threads  >  only new emails on pop3 class  >  (Un) Subscribe thread alerts  
Subject:only new emails on pop3 class
Summary:Is the any way to pass Date/Time to mimparser to get only new
Messages:6
Author:Reza Maghsoudi
Date:2010-02-28 13:41:34
Update:2010-03-03 15:52:44
 

  1. only new emails on pop3 class   Reply   Report abuse  
Picture of Reza Maghsoudi Reza Maghsoudi - 2010-02-28 13:41:34
Hi Manuel,

Actually I've used the pop3/mimeparser class in part of my application which allows people to add their pop3 account details (i.e the server name, username, password, tick for delete after download of not, ...)

But pepole do not like to tick for delete after download and wants to get their emails in their mail clients (i.e outlook, ...) too.

So my problem is that I have to read all people's emails which now increased to tons of emails and caused my cronjob to take long time to run and the server becomes slow when cronjob is running.

I'm saving the latest email's received by date/time and using this to download only new emails, I was thinking if there is any way to pass this to the pop3 server when connecting to it and force the pop3 server to only list new emails of each email account, so I don't need to list all emails of all email accounts and then check the date/time from header and decide if I have to download it or not.

This is going to be really a big problem for me. Thank you if you could help me.

Thanks.
Reza Maghsoudi

  2. Re: only new emails on pop3 class   Reply   Report abuse  
Picture of Majed Majed - 2010-03-01 19:55:01 - In reply to message 1 from Reza Maghsoudi
What about switching to IMAP?

  3. Re: only new emails on pop3 class   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2010-03-01 21:56:25 - In reply to message 1 from Reza Maghsoudi
Some POP3 servers change the Status header of the messages after you download and do not delete the messages. So you may determine if the messages were read before.

In any case, if you keep the messages on the POP3 mailbox forever, after a while it may take too long to scan the mailbox and the mailbox access becomes to slow.

  4. Re: only new emails on pop3 class   Reply   Report abuse  
Picture of Reza Maghsoudi Reza Maghsoudi - 2010-03-03 09:58:36 - In reply to message 3 from Manuel Lemos
Thanks Manuel, seems my pop3 server is the one that is marking messages as read after the pop3 access to the messages, so now my question is: How I can pass this through the pop3 class to do not download emails that has already been read.

  5. Re: only new emails on pop3 class   Reply   Report abuse  
Picture of Reza Maghsoudi Reza Maghsoudi - 2010-03-03 10:18:44 - In reply to message 3 from Manuel Lemos
Or is it possible to get most recent first email headers, so I can stop after downloading x new headers.

  6. Re: only new emails on pop3 class   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2010-03-03 15:52:44 - In reply to message 4 from Reza Maghsoudi
The class does not control the order of the messages it receives, but you can request to get just the headers of each message and check the Status header to see if it is already marked as read.