检索PHP中的退回邮件? [英] Retrieve of the bounce mail in php?

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

问题描述

我使用的是swift mailer,它只能为我提供失败邮件的选择, 也就是说,指示是否将邮件传递到外发邮件服务器(发送过程后不报告). 因此,我正在寻找任何方法来告诉我是否有退回邮件.我找到zend和phpmailer BHM,phpmailer已有一段时间没有更新(2009),那么zend的最佳选择是否可以帮助我做到这一点,或者我可以通过php中的一些编码来做到这一点? 谢谢

I am using swift mailer , which only provide me opition of failure mail, that is, indicate whether the mail delivered to outgoing mail server (not report after sending process). So i am finding any way to tell me whether there is bounce mail. I find zend and phpmailer BHM, the phpmailer has not updated for a while (2009) , so would zend the best choice can help me doing this or i can do it by some coding in php? Thank you

参考:

1.Zend http://framework.zend.com/manual/en/

2.phpmailer BMH http://phpmailer.worxware.com/index.php?pg=bmh

2.phpmailer BMH http://phpmailer.worxware.com/index.php?pg=bmh

推荐答案

要处理退回邮件,Zend Framework仅在所有退回邮件都发送到某个地方的真实邮箱时才有用,然后可以使用 Zend_Mail 以连接到邮箱,并阅读所有消息并寻找弹跳.否则,在我看来,它没有任何东西可以使处理PHP或其他库中无法做到的退回变得更容易.

To process bounced messages, Zend Framework would only be helpful if you had all bounced messages go to a real mailbox somewhere, and then you could use Zend_Mail to connect to the mailboxes, and read all of the messages and look for bounces. Otherwise, in my opinion it doesn't have anything that would make it any easier to process bounces that you couldn't do in PHP or other libraries.

上面肯定是解决这个问题的好方法.

The above is certainly a good solution to this.

或者,您可以将特定电子邮件地址的所有传入邮件通过管道传递到PHP脚本(或者不一定是PHP).该脚本将能够读取stdin来获取电子邮件的内容.然后,您可以使用 mailparse 之类的内容将消息解析为mime部分,以使其更易于处理标头和消息.不需要使用这样的解析器,但是它将使处理退回电子邮件的任务更加容易.为此,请搜索将邮件发送到php 或类似的内容.

Alternatively, you can have all incoming mail for a particular email address piped to a PHP script (or it doesn't have to be PHP). This script would be able to read stdin to get the contents of the email message. You could then use something like mailparse to parse the message into mime parts to make it easier to process the headers and messages. Using such a parser is not required, however it would make the task of processing bounced emails easier. To do something like that, search for pipe mail to php or similar.

此答案还提供了一些很好的信息,有关邮件服务器将退回邮件用于哪个地址.

This answer also provides some good information on which address mail servers will use to send bounces back to.

这篇关于检索PHP中的退回邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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