简体   繁体   中英

Can't send reset password message in laravel 5

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="username@gmail.com"
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' => 'username@gmail.com', 'name' => 'Name'],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('username'),
'password' => env('password'),
'sendmail' => '/usr/sbin/sendmail -bs',
'username' => env('username')
'password' => env('password')

Should be:

'username' => env('MAIL_USERNAME')
'password' => env('MAIL_PASSWORD')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM