Cannot send emails to contacts with AWS SES plugin

Your software
My Mautic version is: 5.2.1
My PHP version is: 8.1.31

Your problem
My problem is:
I installed mautic using the example docker-compose from the repository: docker-mautic/examples/fpm-nginx at mautic5 · mautic/docker-mautic · GitHub .

After installing it correctly, I added the plugin to use AWS-SES , following the directions on the repository: GitHub - pabloveintimilla/mautic-amazon-ses: Mautic 5 plugin, provides Amazon SES as an email transport and callback to process bounces (I had to install composer, nodejs and npm ).

I have the required symfony/amazon-mailer installed.

I configured Email DSN and clicked Send test email, I received the test email correctly. I tried to send an email to a contact saved in ‘Contacts’ and in the log file ‘prod-2025-02-11.php’ I got this error :

messenger.CRITICAL: Error thrown while handling message Symfony\Component\Mailer\Messenger\SendEmailMessage. Removing from transport after 3 retries. Error: “Handling “Symfony\Component\Mailer\Messenger\SendEmailMessage” failed: Connection could not be established with host “localhost:25”: stream_socket_client(): Unable to connect to localhost:25 (Connection refused)”

These errors are showing in the log:
messenger.CRITICAL: Error thrown while handling message Symfony\Component\Mailer\Messenger\SendEmailMessage. Removing from transport after 3 retries. Error: “Handling “Symfony\Component\Mailer\Messenger\SendEmailMessage” failed: Connection could not be established with host “localhost:25”: stream_socket_client(): Unable to connect to localhost:25 (Connection refused)” {“class”:“Symfony\Component\Mailer\Messenger\SendEmailMessage”,“retryCount”:3,“error”:“Handling "Symfony\Component\Mailer\Messenger\SendEmailMessage" failed: Connection could not be established with host "localhost:25": stream_socket_client(): Unable to connect to localhost:25 (Connection refused)”,“exception”:“[object] (Symfony\Component\Messenger\Exception\HandlerFailedException(code: 0): Handling "Symfony\Component\Mailer\Messenger\SendEmailMessage" failed: Connection could not be established with host "localhost:25": stream_socket_client(): Unable to connect to localhost:25 (Connection refused) at /var/www/html/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:130)\n[previous exception] [object] (Symfony\Component\Mailer\Exception\TransportException(code: 0): Connection could not be established with host "localhost:25": stream_socket_client(): Unable to connect to localhost:25 (Connection refused) at /var/www/html/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php:154)”} {“hostname”:“afe006cfb306”,“pid”:56}

Steps I have tried to fix the problem:
I also tried another plugin but with the same result. It would seem that Mautic does not read the properties saved in the local.php file. Why does it try to contact http://localhost:25 and not read the configurations set in the DSN email? It sends test mails from the configuration page correctly. Even when trying with an SMTP server, the result is the same. Is there a problem with the official Docker image? Is there no solution?

I am facing the same issue with my integration of mautic and amazon

Has any solved this issue? I’m running into the exact same issue. I’m using Mautic with Amazon ses+api. I can save the settings, send a test email and it’s successful. But as soon as I attempt to send via a campaign it’s that same problem of Mautic ignoring the transports.

kubectl exec -n mautic deployment/mautic-app – cat /var/www/html/.env.local kubectl exec -n mautic deployment/mautic-app – php /var/www/html/bin/console debug:config framework mailer cat: /var/www/html/.env.local: No such file or directory command terminated with exit code 1

Current configuration for “framework.mailer” ============================================

dsn: ‘%env(urlencoded-dsn:MAUTIC_MAILER_DSN)%’ enabled: true message_bus: null transports: { } headers: { }

I’m finding that no matter what I do to attempt to get Mautic to set the transport to use the DSN setting - it goes empty.

The difference for me is that I’m on v5.1.

Hopefully someone is still paying attention to this thread as it looks like no-one has come to offer a solution for this issue since Feb. Is it a matter of a different Amazon Mailer module? or is there some other spot in Mautic to tweak the install to get it to use the DSN to send emails/campaigns?

I modified my server to replace Exim’s SMTP and use the SES SMTP.
Every email that is delivered by my server is managed completely by my server until it’s actually delivered and bridges the local SMTP and connects to SES.

That solution was perfect.

Since I host several mautics, this was a blessing.

That’s awesome. I’m curious to know if you have a blueprint of how you managed to do that? Would it translate to Kubernetes or Microk8s? Would you be willing to share? I’d rather use SES+API rather than SMTP.

I have full root access and WHM, did it via the WHM Exim editor (you don’t need whm) and by adding a file to let the server know which accounts should use the server smtp vs which to use SES (including SMTP credentials). The best part is that each of my clients can use their own SES accounts.

But this seems so reliable that I am thinking about providing a mautic hosting service.