Laravel message notification email Expected response code 250 but got code & quot; 553 & quot;, with message & quot; 553 Mail from must equal authorized use, authorized

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.