PHP Classes

get pop3 Messages in loop

Recommend this page to a friend!

      POP3 e-mail client  >  All threads  >  get pop3 Messages in loop  >  (Un) Subscribe thread alerts  
Subject:get pop3 Messages in loop
Summary:get pop3 Messages in loop
Messages:4
Author:Tom
Date:2008-09-03 10:23:08
Update:2008-09-12 20:26:39
 

  1. get pop3 Messages in loop   Reply   Report abuse  
Picture of Tom Tom - 2008-09-03 10:23:09
I use the get pop3 mail in loop and process it with Manuels mime parser.
I have one big problem:

My application looks all 2 minutes for new mails in the pop3 box an get mail if any new available in a loop with mime parser processing. That works great.
In the morning i get much mails (> 30-100) in the loop. Here is the Problem: Some Messages the pop3 loop get, are complete empty! Why this? I don't have any idea how i can fix this. Must i loop slower through getting new pop3 mails or is this a mailserver failure or what else?

Tom



  2. Re: get pop3 Messages in loop   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-09-04 04:27:04 - In reply to message 1 from Tom
It is hard to tell.

Anyway, if you take a long time to process a message, the server may disconnect and you may not retrieve more messages without restarting the connection. Maybe you should disconnect and reconnect for every message you process.

  3. Re: get pop3 Messages in loop   Reply   Report abuse  
Picture of Tom Tom - 2008-09-12 13:23:02 - In reply to message 2 from Manuel Lemos
I've found the Bug. It's essential, that there are no two ore more connections to the same Mailbox at same time.

Know any a methode to check, if a Mailbox currently busy for an user.

  4. Re: get pop3 Messages in loop   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-09-12 20:26:39 - In reply to message 3 from Tom
Yes, POP3 usually lock a mailbox during a connection, so you can't access an user mailbox with more than one connection.

The POP3 class allows you to access messages using a stream wrapper on a POP3 server connection established by the same script, so you can parse with the MIME parser class multiple messages of the same mailbox within the same script, if that is what you want.