本文介绍了预期的响应代码为250,但代码为"530",消息为"530 5.7.1",需要身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在laravel

这是我在.env

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=fff3c01db52ee0
MAIL_PASSWORD=feaeda91dc9ab6
MAIL_ENCRYPTION=TLS

我已经尝试过在环境中对SMTP进行身份验证,但是我一直收到相同的错误,因此目前在该错误上处于堆叠状态

I have try to authenticate the SMTP on env but I keep get the same error so for now am stack on that error

推荐答案

您在配置中的mail.php上,您声明host为smtp.mailgun.org,端口为587,而env则不同.您需要将mail.php更改为

your mail.php on config you declare host as smtp.mailgun.org and port is 587 while on env is different. you need to change your mail.php to

'主机'=> env('MAIL_HOST','mailtrap.io'),

'host' => env('MAIL_HOST', 'mailtrap.io'),

'端口'=> env('MAIL_PORT',2525),

'port' => env('MAIL_PORT', 2525),

如果您想使用mailtrap.然后运行

if you desire to use mailtrap.Then run

php artisan config:cache

这篇关于预期的响应代码为250,但代码为"530",消息为"530 5.7.1",需要身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 01:40