如何解析PHP中的.eml文件? [英] How to parse a .eml file in php?

查看:129
本文介绍了如何解析PHP中的.eml文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何解析php中的 .eml 文件?有任何PHP库或PHP扩展吗?

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

我想在浏览器中显示邮件标题信息,例如发件人,收件人,标题,附件和eml正文内容.

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

推荐答案

有两种方法可以做到这一点.一种方法是自己完成,这并不复杂.

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

否则,您可能想看看Mailparse库:

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

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

还有一个:

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

这篇关于如何解析PHP中的.eml文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆