Laravel message notification sending email Expected response code 250 but got code "553", with message "553 Mail from must equal authorized use, authorized
When we are working on a project today, we will use laravel for Message notification, install the tutorials on the official website step by step, and report an error during the test,
Expected response code 250 but got code "553", with message "553 Mail from must equal authorized use
Reprint please note (B5 tutorial) original link: http://www.bcty365.com/content-153-5898-1.html
At that time, the. env mailbox configuration was as follows:
MAIL_DRIVER = smtp
MAIL_HOST = smtp.163.com
MAIL_PORT = 25
MAIL_USERNAME = xxxx@163.com
MAIL_PASSWORD = 1xxxxx71987
MAIL_ENCRYPTION = null
But note that there are two items in config/mail. PHP:
'From' => [
'Address' => env ('mail _ FROM_ADDRESS ', 'Hello @ example.com '),
'Name' => env ('mail _ FROM_NAME ', 'example '),
],
Here, MAIL_FROM_ADDRESS and MAIL_FROM_NAME are not found in the configuration file. So we should add it to. env.
The configuration is as follows:
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 = 1, 132
The problem is solved and the email is sent successfully!