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

**URL:** <https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704>\
**Category:** Product Support\
**Created:** [March 24, 2021, 6:04pm UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704 "2021-03-24T18:04:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tecnotronico](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tecnotronico/32/500_2.png) [@tecnotronico](https://forum.mautic.org/u/tecnotronico)\
**Post date:** [March 24, 2021, 6:04pm UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704/1 "2021-03-24T18:04:26Z")

</div>

**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.

---

<div class="post-metadata">

**Author:** ![mayanktiwaridotcom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mayanktiwaridotcom/32/1501_2.png) [@mayanktiwaridotcom](https://forum.mautic.org/u/mayanktiwaridotcom)\
**Post date:** [April 27, 2021, 6:33pm UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704/2 "2021-04-27T18:33:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [June 9, 2021, 5:34am UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704/3 "2021-06-09T05:34:41Z")

</div>

same here. any solutions?

---

<div class="post-metadata">

**Author:** ![mayanktiwaridotcom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mayanktiwaridotcom/32/1501_2.png) [@mayanktiwaridotcom](https://forum.mautic.org/u/mayanktiwaridotcom)\
**Post date:** [June 13, 2021, 11:16am UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704/4 "2021-06-13T11:16:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [June 18, 2021, 10:00am UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704/5 "2021-06-18T10:00:35Z")

</div>

> [@mayanktiwaridotcom](#):
>
> mailer

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

---

<div class="post-metadata">

**Author:** ![mayanktiwaridotcom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mayanktiwaridotcom/32/1501_2.png) [@mayanktiwaridotcom](https://forum.mautic.org/u/mayanktiwaridotcom)\
**Post date:** [July 12, 2021, 10:51am UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704/6 "2021-07-12T10:51:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [November 18, 2021, 6:31pm UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704/7 "2021-11-18T18:31:28Z")

</div>

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:

```auto
[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:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/f38d0d34465bcdec170216fc3c1b398e1a31d775.png)

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

---

<div class="post-metadata">

**Author:** ![mayanktiwaridotcom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mayanktiwaridotcom/32/1501_2.png) [@mayanktiwaridotcom](https://forum.mautic.org/u/mayanktiwaridotcom)\
**Post date:** [December 12, 2021, 11:46am UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704/8 "2021-12-12T11:46:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [December 13, 2021, 2:38pm UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704/9 "2021-12-13T14:38:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![davidg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/davidg/32/2761_2.png) [@davidg](https://forum.mautic.org/u/davidg)\
**Post date:** [December 27, 2021, 8:00am UTC](https://forum.mautic.org/t/mautic-error-mail-error-expected-response-code-250-but-got-an-empty-response/18704/11 "2021-12-27T08:00:31Z")

</div>

Where is this variable set?
