PHP Classes

Read multiple emails

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Read multiple emails  >  (Un) Subscribe thread alerts  
Subject:Read multiple emails
Summary:Read multiple emails and delete them
Messages:4
Author:naresh chauhan
Date:2011-01-20 13:33:54
Update:2011-01-20 18:10:28
 

  1. Read multiple emails   Reply   Report abuse  
Picture of naresh chauhan naresh chauhan - 2011-01-20 13:33:54
Is it possible to read multiple emails at a time. Suppose I want to implement feature in which for example I have 4 emails, so is it possible that script will insert 1st email into database and delete it. So now there are 3 emails, again script with read email, insert it and delete that email, now we have 2 emails on the server. Is it possible to call script once and all the operation will be done during call. So at the end of script execution we don't have any emails.

  2. Re: Read multiple emails   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-01-20 14:05:29 - In reply to message 1 from naresh chauhan
Sure, you can pass as many e-mail messages you want to the MIME parser class.

  3. Re: Read multiple emails   Reply   Report abuse  
Picture of naresh chauhan naresh chauhan - 2011-01-20 14:20:31 - In reply to message 2 from Manuel Lemos
Please give me some hint
I have following code
for($i=0;$i<$messages;$i++)
{
if($mime->Analyze($decoded[0], $results))
{

}
$pop3->DeleteMessage(1);
}
So what I need to do? I have passed $i in the $decoded array index. It is not working. Give me some hint.

Thanks for your reply.

  4. Re: Read multiple emails   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-01-20 18:10:29 - In reply to message 3 from naresh chauhan
Before calling the Analyze function, you need to call the Decode function passing it the data of the message you want to process.