mautic.ERROR: [MAIL ERROR] Expected response code 250 but got an empty response

Your software
Mautic: 3.2.5, 3.3.1 and 3.3.2
PHP: 7.4
MySQL: 5.7
CentOS: 7.9
cPanel: 94.0.4
PHP-FPM: Activated
Service to send mail through: sendmail
SMTP encryption type: none
How should email be handled?: Send inmmediatly

Your problem
I have been using Mautic for several years now and it always worked fine, however, from version 3.2.5 to 3.3.1 as well as with 3.3.2, it is having problems to send the emails. I have tried all kind of combinations for SMTP or Sendmail and get different kind of errors for each one.

At this case, we are using sendmail and the problem is that, when we execute:

sudo -u [USER] /usr/local/bin/ea-php74 /home/[USER]/public_html/bin/console mautic:campaigns:trigger --batch-limit=10 > /home/[USER]/public_html/var/logs/log-campaigns-trigger.log

it continuously shows the following errors

[2021-03-24 17:18:33] mautic.ERROR: [MAIL ERROR] Expected response code 250 but got an empty response Log data: >> MAIL FROM:<envios+bounce_605b746967425448715072@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) Log data: >> MAIL FROM:<envios+bounce_605b746967425448715072@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) !! Expected response code 250 but got an empty response Log data: >> MAIL FROM:<envios+bounce_605b746967425448715072@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) (code: 0) (send); [EMAIL] {"exception":"[object] (Swift_TransportException(code: 0): Expected response code 250 but got an empty response\nLog data:\n>> MAIL FROM:<envios+bounce_605b746967425448715072@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0)\nLog data:\n>> MAIL FROM:<envios+bounce_605b746967425448715072@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0)\n!! Expected response code 250 but got an empty response\nLog data:\n>> MAIL FROM:<envios+bounce_605b746967425448715072@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0) (code: 0) at /home/[USER]/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:124)"} []
[2021-03-24 17:18:33] mautic.ERROR: [MAIL ERROR] Expected response code 250 but got an empty response Log data: >> MAIL FROM:<envios+bounce_605b7469716fb509668447@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) Log data: >> MAIL FROM:<envios+bounce_605b7469716fb509668447@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) !! Expected response code 250 but got an empty response Log data: >> MAIL FROM:<envios+bounce_605b7469716fb509668447@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) (code: 0) (send); [EMAIL] {"exception":"[object] (Swift_TransportException(code: 0): Expected response code 250 but got an empty response\nLog data:\n>> MAIL FROM:<envios+bounce_605b7469716fb509668447@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0)\nLog data:\n>> MAIL FROM:<envios+bounce_605b7469716fb509668447@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0)\n!! Expected response code 250 but got an empty response\nLog data:\n>> MAIL FROM:<envios+bounce_605b7469716fb509668447@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0) (code: 0) at /home/[USER]/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:124)"} []
[2021-03-24 17:18:33] mautic.ERROR: [MAIL ERROR] Expected response code 250 but got an empty response Log data: >> MAIL FROM:<envios+bounce_605b74697b963053665746@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) Log data: >> MAIL FROM:<envios+bounce_605b74697b963053665746@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) !! Expected response code 250 but got an empty response Log data: >> MAIL FROM:<envios+bounce_605b74697b963053665746@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) (code: 0) (send); [EMAIL] {"exception":"[object] (Swift_TransportException(code: 0): Expected response code 250 but got an empty response\nLog data:\n>> MAIL FROM:<envios+bounce_605b74697b963053665746@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0)\nLog data:\n>> MAIL FROM:<envios+bounce_605b74697b963053665746@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0)\n!! Expected response code 250 but got an empty response\nLog data:\n>> MAIL FROM:<envios+bounce_605b74697b963053665746@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0) (code: 0) at /home/[USER]/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:124)"} []
[2021-03-24 17:18:34] mautic.ERROR: [MAIL ERROR] Expected response code 250 but got an empty response Log data: >> MAIL FROM:<envios+bounce_605b746a4c1d5083169814@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) Log data: >> MAIL FROM:<envios+bounce_605b746a4c1d5083169814@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) !! Expected response code 250 but got an empty response Log data: >> MAIL FROM:<envios+bounce_605b746a4c1d5083169814@[DOMAIN]>  !! Expected response code 250 but got an empty response (code: 0) (code: 0) (send); [EMAIL] {"exception":"[object] (Swift_TransportException(code: 0): Expected response code 250 but got an empty response\nLog data:\n>> MAIL FROM:<envios+bounce_605b746a4c1d5083169814@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0)\nLog data:\n>> MAIL FROM:<envios+bounce_605b746a4c1d5083169814@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0)\n!! Expected response code 250 but got an empty response\nLog data:\n>> MAIL FROM:<envios+bounce_605b746a4c1d5083169814@[DOMAIN]>\r\n\n!! Expected response code 250 but got an empty response (code: 0) (code: 0) at /home/[USER]/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:124)"} []

Steps I have tried to fix the problem:
I have changed to SMTP multiple configurations, tried several values for --bath-limit, aumeted the php allow memory upto 1.5GB (1024MB normally), etc.

1 Like

Facing the same issue,
Mautic 3.1.2 with php 7.2.24
does anyone have solution yet ?

1 Like

same here. any solutions?

In My case turned out that “Owner is mailer” was turned on but my SES was configured for a different email. So I turned off the Owner is mailer switch and used SES configured email as mailer email And the issue was resolved.

But I think in that case, you get an error saying that the email is not verified.

could be, but I have faced this couple of times since i posted message here, and everytime, it gets fixed when i disable “owner is mailer” option.

1 Like

We are experiencing the same issue with Mautic 4.0.1 with Amazon SES. The weird thing is that some emails are going through.

We are running a campaign with around 300,000 contacts, and I am seeing the log start to fill up and also noticing lots of failed events.

In the system log I am getting messages like this:

[2021-11-18 18:24:51] mautic.ERROR: [MAIL ERROR] Expected response code 250 but got an empty response (send); kfdsfd@wfdsf.com {"exception":"[object] (Swift_TransportException(code: 0): Expected response code 250 but got an empty response at /var/www/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:447)"} []

in the contact card I see this message and that it has been rescheduled to send later this evening:

Not sure how to go about debugging this. So any ideas would be greatly welcome

I have encountered this issue 3 times. Here i am listing all the cases maybe one of it will help:

  1. The mail which you put in the email config in mautic should be the sender email, if you have configured mailer is owner. The conflict may arrive when in email creation you put from address different from what is there in config section.
  2. The SES email was not dns verified, it needs to have MX record in dns for verification.
  3. In case of one of my clients, the issue was, the SES had put the mailing on pause because of too many bounces.

I think this might have had an issue to do with rate limit, we upped our rate limit to 75mails per second and it went away

Where is this variable set?