Re: mail mimedecode with multiple mails in one mbox file
| From: | Manuel Lemos | Date: | Mon, 16 Nov 2009 02:41:47 +0000 |
| Subject: | Re: mail mimedecode with multiple mails in one mbox file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299858@lists.php.net to get a copy of this message | ||
Hello,
on 11/15/2009 05:22 PM Ashley Sheridan said the following:
> Hi all,
>
> I'm having a bit of difficulty seeing my way through this. I think I'm
> on the right path with mimeDecode, but I can't get it to read all of the
> emails in an mbox file which contains 100 emails; it only reads the
> first.
>
> I've looked over the docs on pear.php.net, but can't seem to find any
> way to get the other 99 emails out!
>
> Does anyone know of any way to do this, or have you done something
> similar another way? Just to clarify, I won't be connecting to an
> external mailbox for this, so it has to be something I can use on a
> local mbox file.
The mbox format is not exactly compatible with the regular MIME message
format.
Anyway, you may use the MIME parser class which supports parsing single
MIME messages as well multi-message messages in the mbox format. Just
set the mbox class variable to 1.
http://www.phpclasses.org/mimeparser
--
Regards,
Manuel Lemos
Find and post PHP jobs
http://www.phpclasses.org/jobs/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/