如何使用PHP从“Undelivered Mail Return to Sender”

时间:2017-10-24 16:40:23

标签: php apache email cakephp daemon

我们有50,000封电子邮件列表。其中一些是不存在的,但我们不知道哪些。

当我们向该列表发送简报时,某些电子邮件未送达(假设某些收件人不存在),因此我们会收到这样的自动回复电子邮件:

邮件传递系统我很遗憾地通知您,您的邮件无法发送给一个或多个收件人。它附在下面......

我们想以某种方式将这些通知电子邮件附加到php脚本以在数据库中标记这些电子邮件,以便我们将来不再使用它们,因为这会浪费时间和资源。

我们正在寻找的脚本或技术的名称是什么?

我正在复制下面的电子邮件。

感谢您的帮助!

Mail Delivery System <MAILER-DAEMON@gproxy1.mail.unifiedlayer.com>
Attachments5:54 AM (6 hours ago)

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<gaviglio.herve@bbox.fr>: host mx.bbox.fr[194.158.98.50] said: 550 5.1.1
    <gaviglio.herve@bbox.fr>: Recipient address rejected: User unknown in local
    recipient table (in reply to RCPT TO command)

Final-Recipient: rfc822; gaviglio.herve@bbox.fr
Original-Recipient: rfc822;gaviglio.herve@bbox.fr
Action: failed
Status: 5.1.1
Remote-MTA: dns; mx.bbox.fr
Diagnostic-Code: smtp; 550 5.1.1 <gaviglio.herve@bbox.fr>: Recipient address
    rejected: User unknown in local recipient table

1 个答案:

答案 0 :(得分:0)

处理退回的电子邮件没有简单的方法。通过使用SendGrid,MailChimp和Amazon SES等邮件API,您可能会为自己省去很多麻烦。