Retrieve of the bounce mail in php?

一世执手 提交于 2019-12-01 12:41:59

问题


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

Reference:

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

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


回答1:


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.



来源:https://stackoverflow.com/questions/9436584/retrieve-of-the-bounce-mail-in-php

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