On Fri, May 12, 2006 6:12 am, Jochem Maas wrote:
> Graham Anderson wrote:
>> I am trying to get the body text from a number of different emails
>> using mimeDecode [Pear]
>> Unfortunately, it appears that the body text could be in any number
>> of
>> locations in the stdClass Object depending on which email is
>> processed.
>> At this point, I can only access the node by looking at the print_r
>> ($structure) directly :(

As I recall, finding the plain-text body was a royal pain in the ass...

I think you end up having to write a recursive function searching
through all the headers and crap until you find a mime type plain/text

I believe I ended up just "giving up" and assuming that any email with
a "too complex" HTML body part struture *MUST* be spam, and I just
threw it away.  But I was writing a custom spam filter at the time, so
that may have influenced my decision. :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to