We keep running into the below error.
dev.ERROR: Exception occurred when sending an email {"exception":"[object] (Symfony\Component\Mailer\Exception\TransportException(code: 0): Expected response code \"250\" but got empty code. at /usr/share/nginx/html/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php:338) ","message":"Expected response code \"250\" but got empty code."
It's sporadic and does not happen all the time. It happens for all types of addresses (not only Gmail).
We are sending emails using Mandrill, with the below configuration. I added the MAIL_EHLO_DOMAIN as an attempted fix (that's what the internet told me). But that does not fix the problem.
I'm also not able to find anything online regarding this exact error, other people always get a different code instead of an empty one. (Like 550).
Configuration:
config/mail.php:
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
],
.env file:
MAIL_MAILER=smtp
MAIL_HOST=smtp.mandrillapp.com
MAIL_PORT=587
MAIL_ENCRYPTION=tls
MAIL_USERNAME=<OUR_USERNAME>
MAIL_PASSWORD=<OUR_PASSWORD>
MAIL_FROM_ADDRESS=<OUR_MAILBOX>
MAIL_FROM_NAME=<OUR_FROM_NAME>
MAIL_EHLO_DOMAIN=<OUR_DOMAIN>
MANDRILL_SECRET_KEY=****************
Any pointers in the right direction would be greatly appreciated!