0

Expected response code 250 but got code "530", with message "530-5.5.1 Authentication Required.

.env

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME="[email protected]"
MAIL_PASSWORD="password"
MAIL_ENCRYPTION=tls

config/mail.php

'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.gmail.com'),
'port' => env('MAIL_PORT', 587),
'from' => ['address' => '[email protected]', 'name' => 'Name'],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('username'),
'password' => env('password'),
'sendmail' => '/usr/sbin/sendmail -bs',

1 Answer 1

1
'username' => env('username')
'password' => env('password')

Should be:

'username' => env('MAIL_USERNAME')
'password' => env('MAIL_PASSWORD')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.