Laravel email 发送邮件

2017-07-19 18:22:39

#在.env文件中设置如下
MAIL_DRIVER=smtp
MAIL_HOST=smtp.qq.com
MAIL_PORT=465
MAIL_USERNAME=00000000000@qq.com
MAIL_PASSWORD=填写授权码(在QQ邮箱设置-账户-POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务-生成授权码)
MAIL_ENCRYPTION=ssl
#在config/mail.php文件中设置如下
'from' => ['address' => '00000000000@qq.com', 'name' => 'Laravel5'],
#或者在.env中添加
MAIL_FROM_NAME=tester
MAIL_FROM_ADDRESS=00000000000@qq.com

具体操作可以参考:https://lvwenhan.com/laravel/436.html