2017-02-17 91 views
0

預期的響應碼250發送重置密碼的消息,但拿到代碼 「530」,與消息「530-5.5.1需要進行身份驗證。不能在laravel 5

.ENV

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

配置/ 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
'username' => env('username') 
'password' => env('password') 

應該是:

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

謝謝,解決了! (: – Ronald