从原始正文解析邮件的最佳 PHP 类?
作为来源,我有由原始电子邮件组成的变量,带有标题和正文:
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
我可以使用的最好的课程是什么?
As sources, i have variables composed by the raw email, with headers and 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)
I repeat it: i have this as text in variables, if not i would use imap_fetchbody (that requires a remote mailbox to work, can't get raw inputs)
I also found this library that seems to be quite complete: http://pear.php.net/package/Mail_mimeDecode
What is the best class i can use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
mailparse 如果你为 php 安装了它,它会非常高效,因为它不保留在内存中的消息。
mailparse if you get it installed for php is very efficient because it does not keep in memory messages.