phpphpmailerswiftmaileremail-bounces

Bounce Support for Swiftmailer


I see recommendations for Swiftmailer for handling bounce messages here, yet I don't see the support for this in the documentation. Am I missing something? It appears to me that PHPMailer-BHM is the only option out there with this feature ready to go out of the box. If this is incorrect, please elaborate.

I am asking because Swiftmailer looks to have the best documentation and support moving forward, but I don't want to spend time re-inventing the wheel creating a class to parse and handle the NDR's.


Solution

  • 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.