Currently I\'m using the PEAR library\'s mimeDecode.php for parsing incoming emails. It seems to have a lot of issues and fails to decode a lot of messages, so I\'d like to
I'm currently also on the lookout for an easy to use, robust MIME email parsing library and am currently seriously looking into Mail component from eZ Components. But, if you're looking for something that will make it as easy as echo $email->text;
or echo $email->html;
, like I was, you'll be disappointed. Actually, now I don't think such simplification is even possible, due to the way MIME works. But it does seem like the best option out there in the PHP world.
I started working on my current project with Zend_Mail component, but when the time came to actually dig inside those email parts and encoded headers, Zend_Mail pretty much leaves you out in the cold. You need to do most decoding yourself, which is not fun at all.
As for IMAP PHP extension, its meant to deal with retrieving messages from your mailbox, not MIME decoding them. Although, it does have some handy decoding function that you might need. Mailparse PECL extension, on the other hand, deals with exactly that problem set. I haven't tried it yet, but it seems like you need to write a lot of code to actually get to the data you want.