messenger.CRITICAL: Error

Your software
My Mautic version is: latest via docker pull mautic
My PHP version is: PHP version comes from official docker image of Mautic
My Database type and version is: latest via docker pull mysql

Your problem
My problem is:
If I go settings > configuration > email settings > and hit “send test mail” - I will receive test email correctly signed by DKIM/SPF. Everything works as expected!

If I create a segment email and hit “send test email” or send real email to the segment, nothing is delivered and in the console I will get the following error:

These errors are showing in the log:
[2024-06-26T19:40:46.607330+00:00] 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”:“f90bbc2b2e39”,“pid”:56}

Steps I have tried to fix the problem:
I was trying to change the SMTP provider but somehow there is no effect. Still getting this error.

Please… I am totally lost. I do not understand why the test email via config works (so SMTP is fine!) but real email via Email component are not delivered…

Using docker compose up -d with latest mysql and mautic image.

Thank you!

Hi there,

Your scheme must be “mautic+ses+api” after that validation of client details must work.

Hi, that depends what plugin you use. Some plugin requires ses+api, some mautic+ses+api.
Read the docs of your plugin or the symfony docs related to email sending.
However in this case I think this is an SMTP you connect via port 25. That might be blocked by your provider.
You didn’t mention if you actually received the test email.