使用 Zend_Mail 获取邮件源
如何使用 Zend_Mail (POP3) 获取邮件源(标头、正文、边界 - 全部作为纯文本)。
它默认返回已解析的部分,我需要原始消息源。
How can I get mail source (headers, body, boundary - all together as a plain text) using Zend_Mail (POP3).
It returns parsed parts by default, I need the raw message source.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Zend Mail 中没有这样的方法。
但是您可以查看类源并了解如何向邮件服务器发送直接命令以获取消息源。
There's no such method in Zend Mail.
But you may look at the class sources and see how to send a direct command to the mail server to get the message source.
也许您可以使用
Zend_Mail_Storage_Pop3
类的getRawHeader()
和getRawContent()
方法。这足以满足您的目的吗?一些 API 文档(我在参考指南中没有找到它们) ):
Maybe you could use the
getRawHeader()
andgetRawContent()
methods of theZend_Mail_Storage_Pop3
class. Would it be enough for your purpose?Some API docs (I didn't find them in the Reference Guide):
如果你有 Zend_Mail 实例,你可以获得解码后的内容:
If you have a Zend_Mail instance, you can get the decoded content:
我为此创建了自己的图层:
而不只是调用它:
I made my own layer for that:
And than only call that: