Mautic 5.0.3 AWS SNS endpoint is not working. GIve a solution to handle bounce and Complaint emails

Hi there u can also try to use our extension:

https://github.com/pm-pmaas/etailors_amazon_ses

This module manages both the sending of the mails with Amazon SES as well bounce returns by Amazon SNS.

Extension is still in beta so feedback on it is welcome. We have running it at this moment in about 10 installations without known issues at the moment.

1 Like

Thanks for your plugin, now I have to generate a bounce to check that everything works :wink:

Can you share me the steps to do it? Still I am stuck. plugin is not being installed. Please provide a guide how to do this . Should I try with root user or the user I am using in the cpanel.

Sure, please try to steps below:

Setup:

  1. Download module from GIT in plugins folder
  2. Rename folder name of module to AmazonSesBundle
  3. Clear cache with php bin/console cache:clear

Configuration e-mail sending

  1. Login to mautic
  2. Go to configuration e-mail
  3. put in settings from Amazon SES ( Simple e-mail service )
    1. DSN: mautic+ses+api
    2. Host: default
    3. Username: From Amazon SES SMTP settings
    4. Password: From Amazon SES SMTP settings
    5. Region: From Amazon SES
  4. Test if mail sending is working, if not please correct given errors

Configuration of SNS callback

  1. Go to Amazon SNS ( Simple notification service )
  2. Add topic
  3. Add subscription (HTTPS)
  4. Add url: https://yourmauticinstance.com/mailer/callback
  5. Check if subcription is confirmed
  6. Go back to Amazon SES (Simple e-mail service )
  7. Connect subscription topic
  8. Test bounces / compliants etc.


Hope this helps u!

Thank you.

Hi, thank you for your plugin. I´m receiving the following error in Mautic Logs:

mautic.WARNING: PHP Warning - is_readable(): open_basedir restriction in effect. File(/home/manehu/.aws/config) is not within the allowed path(s): (/home/manehu/.composer:/home/manehu/web/mautic.ctrlt.es/public_html:/home/manehu/web/mautic.ctrlt.es/private:/home/manehu/web/mautic.ctrlt.es/public_shtml:/home/manehu/tmp:/tmu/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) - in file /home/manehu/web/mautic.ctrlt.es/public_html/vendor/aws/aws-sdk-php/src/DefaultsMode/ConfigurationProvider.php - at line 152 {“hostname”:“hestia.ctrlt.es”,“pid”:358391}

¿Can someone help me, please?

Hi you need to install this in the plugins folder, inside Mautic.

1 Like

Thank you for your response @joeyk.

I belive it is installed in the correct folder:

/home/manehu/web/mautic.ctrlt.es/public_html/plugins#

Hi!

Thank you for the plugin. Sending emails via SES works fine!
…but SNS not:(
I did everything according to your instructions but got this log error:

[2024-05-01T20:09:24.407172+00:00] mautic.WARNING: PHP Warning - Undefined array key “Type” - in file …/plugins/AmazonSesBundle/EventSubscriber/CallbackSubscriber.php - at line 236

Do you know why or how to handle this problem.
Even if I send an email to a non existing email address Mautic do not mark this fake contact as DNC.

Kind regards,

Greg

Hi Gregy1,

In which folder have u installed the Bundle ? Which version of Mautic do u use exactly ?

Please let me know!

Regards Paul

Hi,

I have develop a plugin to Mautic 5 to Amazon SES.

You can try in: [GitHub - pabloveintimilla/mautic-amazon-ses: Mautic 5 plugin, provides Amazon SES as an email transport and callback to process bounces ](GitHub - pabloveintimilla/mautic-amazon-ses: Mautic 5 plugin, provides Amazon SES as an email transport and callback to process bounces

To confirm sns suscription check readme of plugin

Regards!

1 Like

Hello!

Thank you very much for your reply!

To be more precise I took a screenshot of my FTP:

The Bundle is installed in the plugins folder.

Mautic shows the plugin as active:

Sending e-mails via SES works perfect. Here’s a screenshot of Email Settings:

SNS Endpoint is also confirmed:

…and all of that is set upon Mautic ver. 5.0.4

Nevertheless, the SNS for a bounce e-mail creates this entry in Mautic log → mautic.WARNING: PHP Warning - Undefined array key “Type” - in file …/plugins/AmazonSesBundle/EventSubscriber/CallbackSubscriber.php - at line 236

Is there any help for me with this?

:sob:

P.S. My instance is on shared hosting.

You may need to try 2465 port instead of 465.

obraz

It worked with me.