Reputation: 1394
I found this script:
http://code.google.com/p/php-mime-mail-parser/
It does a much better job parsing the email than what I have concocted for one of my projects over the last year.
For this to work though, the input needs to be the raw text of the email, the entire header and body parts. I have not found a PHP imap function that returns the entire email.
Do you know of one, or is their a way to piece it together?
Upvotes: 5
Views: 2313
Reputation: 26597
imap_fetchheader can be used to retrieve the entire raw header and imap_body returns the entire body.
Upvotes: 6