Retrieve of the bounce mail in php?

只愿长相守 提交于 2019-12-01 13:52:23
drew010

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.

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.

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