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?
imap_fetchheader can be used to retrieve the entire raw header and imap_body returns the entire body.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With