How to parse a .eml file in php?

空扰寡人 提交于 2019-12-29 09:30:17

问题


How to parse a .eml file in php? Is there any PHP libriary or PHP extension ?

I want to display the mail header information such as sender, receiver, title, attachement and eml body content in browser.


回答1:


There are a couple of ways to do it. One way is to simply do it yourself, it's not that complicated.

Otherwise, you might want to have a look at the Mailparse library:

http://php.net/manual/en/book.mailparse.php

And there is also this one:

http://code.google.com/p/php-mime-mail-parser/



来源:https://stackoverflow.com/questions/11409235/how-to-parse-a-eml-file-in-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!