Bounce Support for Swiftmailer

跟風遠走 提交于 2019-12-06 05:39:31

Swiftmailer is more concerned with sending email (e.g. from your script to an SMTP server which handles the delivery). Swiftmailer has no capacity for receiving emails, which is what a bounce is.

The only time Swift could catch a bounce is if the SMTP server it's handing the email off to rejects the email outright. Otherwise, once it's queued in the SMTP server, Swiftmailer's done with it.

In real world terms, Swiftmailer is you walking a letter down the the mailbox. If the mailbox is welded shut, Swiftmailer will tell you, but otherwise the letter goes into the mailbox and then Swift's done.

A bounce is a letter carrier coming by the next day to drop off the envelope with 'return to sender' stamped on it. Swift has nothing to do with this, as it doesn't RECEIVE emails, it only walks them from your house to the mailbox.

Engr James

Setting the Return-Path: (Bounce) Address The Return-Path: address specifies where bounce notifications should be sent and is set with the setReturnPath() method of the message.

You can only have one Return-Path: and it must not include a personal name.

Bounce notifications will be sent to this address:

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