从原始正文解析邮件的最佳PHP类


Best PHP class to parse mail from raw body?

作为源,我有由原始电子邮件组成的变量,具有标题和正文:

From: Guy <mail>
Subject: Stuff
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
X-etc: etc etc etc
This is the raw body.
(body in some cases also contains quoted printable encoding, attachments, base64, etc etc)

我重复一遍:我把它作为变量中的文本,如果不是,我会使用imap_fetchbody(需要远程邮箱才能工作,无法获得原始输入)

我还发现这个库似乎很完整:http://pear.php.net/package/Mail_mimeDecode

我能使用的最好的类是什么?

mailparse在PHP中是非常高效的,因为它不会在内存中保存消息