Your software
My Mautic version is: 6.0.2
My PHP version is: 8.3
My Database type and version is: Ver 15.1 Distrib 10.3.39-MariaDB
Your problem
My problem is:
Sending example email does not work.
These errors are showing in the log:
[2025-06-10T21:19:51.281965+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 /srv/mautic/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:124)\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 /srv/mautic/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php:154)"} {"hostname":"REDACTED","pid":26400}
Steps I have tried to fix the problem:
Cleared cache.
Verified email DSN: smtp://USERNAME:SECRET@smtp-broadcasts.postmarkapp.com:25
Sending test from the settings page works.
Seems others were having similar problem here (doesn’t look to be related to AWS btw): Cannot send emails to contacts with AWS SES plugin · Issue #14584 · mautic/mautic · GitHub
Seems that it is ignoring the DNS and trying to send from the default of localhost:25.