Laravel 5.5 error when trying to send mail using PHP mail (): the expected response code is 250, but received the code "550",

I upgraded the site to Laravel 5.5 and suddenly I can no longer send mail, as this gives me the following error:

production.ERROR: the expected response code is 250, but received the code "550", with the message "550-Not authenticated, enable SMTP authentication in emails and 550 verify login credentials

I have no idea why he is trying to use SMTP when I specified the mail in mine .env, which apparently ignores:

MAIL_DRIVER=mail
MAIL_HOST=
MAIL_PORT=25
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

This is a brand new installation of Laravel 5.5. I launched composer dumpautoloadand artisan cache:clear.

reference

EDIT:

A simple PHP file with the following code works fine:

$to      = 'my_email_address@hotmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
    'Reply-To: webmaster@example.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

exit();
+1
1

, , . , , , , . MAIL_DRIVER = mail mail php, laravel .

Geniune .env ( gmail)

MAIL_DRIVER=smtp
MAIL_HOST= smtp@gmail.com
MAIL_PORT=25/587/465/2525 (any one)
MAIL_USERNAME=youremail@gmail.com
MAIL_PASSWORD=your app password
MAIL_ENCRYPTION=tls

App

.env, - , mailtrap.io, .

MAIL_DRIVER=smtp
MAIL_HOST= smtp@mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=dfj233ddfk3 // you will get this as you signup for mailtrap
MAIL_PASSWORD=your_mailtrap_password
MAIL_ENCRYPTION=tls

1

PHP mail(), sendbox , , this SO post ,

0

Source: https://habr.com/ru/post/1675286/


All Articles