# Bounce management from SNS with Amazon

**URL:** <https://forum.mautic.org/t/bounce-management-from-sns-with-amazon/16743>\
**Category:** Product Support\
**Created:** [October 26, 2020, 10:02am UTC](https://forum.mautic.org/t/bounce-management-from-sns-with-amazon/16743 "2020-10-26T10:02:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![klaasvna](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/klaasvna/32/957_2.png) [@klaasvna](https://forum.mautic.org/u/klaasvna)\
**Post date:** [October 26, 2020, 10:02am UTC](https://forum.mautic.org/t/bounce-management-from-sns-with-amazon/16743/1 "2020-10-26T10:02:53Z")

</div>

Hello community

We are trying to set up a Mautic instance with SES and bounce managament from SNS with Amazon Web Services. We followed the instructions here carefully; [https://docs.mautic.org/en/channels/emails/bounce-management](https://docs.mautic.org/en/channels/emails/bounce-management)

Amazon gives a confirmed on the subscription and we set up the notifications both on the domain and the e-mail we are using to send the mails. We are testing using SES sandbox accounts; [https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-simulator.html](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-simulator.html) with [bounce@simulator.amazonses.com](mailto:bounce@simulator.amazonses.com).

Yet the bounces don’t get recorded by Mautic. Can anyone help us troubleshout this problem?

Some extra information:

- When we visit /mailer/amazon/callback we get a 500 server error. I don’t know if that’s normal behaviour since it’s a callback url.
- We are on mautic 2.16.2 or 2.16.3
- The Mautic instance is hosted in another AWS region than the SES and SNS.
- We are testing the bounces by sending a mail from channels \> e-mails to a test user with the e-mailadres; [bounce@simulator.amazonses.com](mailto:bounce@simulator.amazonses.com)
- When checking the logfile I’m seeing 2 errors:

Type error: Argument 1 passed to Mautic\EmailBundle\Swiftmailer\Transport\AmazonTransport::processJsonPayload() must be of the type array, null given, called in /var/www/html/app/bundles/EmailBundle/Swiftmailer/Transport/AmazonTransport.php on line 103

And

PHP Notice - SessionHandler::gc(): ps\_files\_cleanup\_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) - in file /var/www/html/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php - at line 86 {“maxlifetime”:1440}

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [October 26, 2020, 10:53am UTC](https://forum.mautic.org/t/bounce-management-from-sns-with-amazon/16743/2 "2020-10-26T10:53:01Z")

</div>

Why not start with Mautic 3.x?

Check email settings to ensure you are not using the “other smtp” selection with Amazon . Select Amazon specifically.

A quick forum search gave me this:

> [@New help with bounce management](https://forum.mautic.org/t/new-help-with-bounce-management/12831/11):
>
> The problem:  
> i forgot to choose my SNS-Subscription in SES under E-mail-adresses \> [mydomain.com](http://mydomain.com) \> Notifications \> edit configuration \> Bounces/complaints
> 
> I had it set up for Domains-tab, but i forgot to do it for e-mail-tab too.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 27, 2020, 9:50pm UTC](https://forum.mautic.org/t/bounce-management-from-sns-with-amazon/16743/3 "2020-10-27T21:50:23Z")

</div>

Hi, do you have https on this server allowed?  
Thx  
Joey

---

<div class="post-metadata">

**Author:** ![davidfinley](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/davidfinley/32/3285_2.png) [@davidfinley](https://forum.mautic.org/u/davidfinley)\
**Post date:** [October 30, 2020, 4:13am UTC](https://forum.mautic.org/t/bounce-management-from-sns-with-amazon/16743/4 "2020-10-30T04:13:00Z")

</div>

Are you using Amazon SES - SMPT or Amazon - API. for the connection? The SNS does not work with the API from what I can work out.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 30, 2020, 7:51am UTC](https://forum.mautic.org/t/bounce-management-from-sns-with-amazon/16743/5 "2020-10-30T07:51:12Z")

</div>

I think it does. Check this:

> [@3.1.0: SES API working but not SNS (404 /worker/amazon/callback)](https://forum.mautic.org/t/3-1-0-ses-api-working-but-not-sns-404-worker-amazon-callback/15832/7):
>
> Why is it a different endpoint? Does SNS feedback loop give a different webhook if you send emails via API not SMTP?

---

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [June 11, 2021, 1:22pm UTC](https://forum.mautic.org/t/bounce-management-from-sns-with-amazon/16743/6 "2021-06-11T13:22:16Z")

</div>

> [@EJL](#):
>
> specifically

Hi @joeyk , I am working with Amazon API, I have set up subscribers as my email and also the webhook.  
I can also confirm that mautic:email:fetch is indeed working and reading all my mails regarding bounces that I received from sns, but still it is not marking the contact as do not contact and not showing bounced
