Home > PHP Framework > Laravel > body text

Solve laravel5 sending email prompt: cannot send message without a sender address

藏色散人
Release: 2019-10-31 14:25:13
forward
5475 people have browsed it

First of all, the email configuration of laravel 5 is unified in the .env file. We configure it

MAIL_DRIVER=smtp
MAIL_HOST=smtp.ym.163.com
MAIL_PORT=25
MAIL_USERNAME=账号
MAIL_PASSWORD=密码
Copy after login

After we configure it, the error is still prompted when sending the email

cannot send message without a sender address
Copy after login

This It’s because we need to modify the mail.php configuration file

Open config/mail.php and find the from configuration item

'from' => ['address' => null, 'name' => null],
Copy after login

We need to configure the sending address and displayed nickname, and combine these two Once the items are configured, it will be ok~

Related recommendations: laravel development

The above is the detailed content of Solve laravel5 sending email prompt: cannot send message without a sender address. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!