Swift_TransportException预期响应代码为250,但代码为“ 530”,并显示消息“ 530 5.7.1要求身份验证”

时间:2019-12-18 15:39:49

标签: laravel-5

我是Laravel的新手,并希望提高使用Laravel Framework 5.4的技能。但是,当我遇到此错误时,我不知道该怎么办:1/1)Swift_TransportException预期的响应代码为250,但代码为“ 530”,消息为“ 530 5.7.1需要身份验证。

2 个答案:

答案 0 :(得分:0)

make sure that you are using the mail credential in .env file. i think you try to send mail without using the mail credentials.so,
create credentials on sendgrid or any mail service for send mail and put these credentials in .env file.

MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=your credentials username
MAIL_PASSWORD=your secret key
MAIL_ENCRYPTION=tls

答案 1 :(得分:0)

替换这个

'用户名' => env('ivanedu947@gmail.com'),

'密码' => env('密码'),

到这里

'username' => env('MAIL_USERNAME','miemail@gmail.com'),

'password' => env('MAIL_PASSWORD','password'),

和 php 行命令键

php 工匠配置:缓存

它必须是有效的