发送密码重置电子邮件Laravel 5.4时出错

发送密码重置电子邮件Laravel 5.4时出错,laravel,email,Laravel,Email,这是第一次将邮件配置为发送密码重置。我检查了安全性较低的系统是否处于活动状态。我得到了这个错误 Expected response code 250 but got code "530", with message "530 5.7.0 Must issue a STARTTLS command first. g63sm30213782wme.11 - gsmtp" Expected response code 250 but got code "530", with message "53

这是第一次将邮件配置为发送密码重置。我检查了安全性较低的系统是否处于活动状态。我得到了这个错误

Expected response code 250 but got code "530", with message "530 5.7.0 
Must issue a STARTTLS command first. g63sm30213782wme.11 - gsmtp"
Expected response code 250 but got code "530", with message "530-5.5.1 
Authentication Required. Learn more at 530 5.5.1 
https://support.google.com/mail/?p=WantAuthError u189sm6330267wmg.18 - gsmtp"
这是我的配置

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=hmshafik10@gmail.com
MAIL_PASSWORD=***********
MAIL_ENCRYPTION=tls
更新 试图在config/mail.php中使用set-mail数据。现在我得到了这个错误

Expected response code 250 but got code "530", with message "530 5.7.0 
Must issue a STARTTLS command first. g63sm30213782wme.11 - gsmtp"
Expected response code 250 but got code "530", with message "530-5.5.1 
Authentication Required. Learn more at 530 5.5.1 
https://support.google.com/mail/?p=WantAuthError u189sm6330267wmg.18 - gsmtp"

也可能是您实际上没有从.env文件中获取这些变量

编辑.env文件时,必须使用清除缓存

php artisan cache:clear 
如果你正在运行应用程序,那么最好的办法就是重新启动它

php artisan serve
然后停止并再次运行

的可能重复