首先,laravel 5 的邮件配置,统一在 .env 文件里面,我们把他配置好
MAIL_DRIVER=smtp MAIL_HOST=smtp.ym.163.com MAIL_PORT=25 MAIL_USERNAME=账号 MAIL_PASSWORD=密码
当我们配置好了以后,发送邮件还是提示错误
cannot send message without a sender address
这是因为我们需要去修改一下 mail.php 配置文件
打开 config/mail.php 找到 from 配置项
'from' => ['address' => null, 'name' => null],
我们需要配置发件地址,和显示的昵称,把这两项配置好了就ok啦~
相关推荐:laravel开发
以上就是解决laravel5 发送邮件提示:cannot send message without a sender address的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号