标签:href xxxxx response config use xxx smtp port res
今天在做项目的时候,使用laravel做消息通知,安装官网教程一步一步做下来,测试的时候报错,
Expected response code 250 but got code "553", with message "553 Mail from must equal authorized use
转载请注明(B5教程网)原文链接:http://www.bcty365.com/content-153-5898-1.html
当时.env邮箱配置如下:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.163.com
MAIL_PORT=25
MAIL_USERNAME=xxxx@163.com
MAIL_PASSWORD=1xxxxx71987
MAIL_ENCRYPTION=null
但是我们注意一下config/mail.PHP中有两项
‘from‘ => [
‘address‘ => env(‘MAIL_FROM_ADDRESS‘, ‘hello@example.com‘),
‘name‘ => env(‘MAIL_FROM_NAME‘, ‘Example‘),
],
这里的MAIL_FROM_ADDRESS,MAIL_FROM_NAME在配置文件中是没有的。所以我们应该加到.env中
最后配置如下:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.163.com
MAIL_PORT=25
MAIL_USERNAME=xxxx@163.com
MAIL_PASSWORD=1xxxxx71987
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=xxxx@163.com
MAIL_FROM_NAME=132
这样问题解决了,发送邮件成功!
标签:href xxxxx response config use xxx smtp port res
原文地址:http://www.cnblogs.com/bcty365/p/7251811.html