Home >PHP Framework >Laravel >Solve laravel5 sending email prompt: cannot send message without a sender address

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

藏色散人
藏色散人forward
2019-10-31 14:25:135567browse

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=密码

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

cannot send message without a sender address

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],

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!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete