简体   繁体   English

文书工作问题 - Swift_TransportException '无法在没有发件人地址的情况下发送消息'

[英]Paperwork issues - Swift_TransportException 'Cannot send message without a sender address'

抛出的异常

I have a virtual machine running paperwork from GitHub, I use it in my organization for users to write notes but now I've run into an issue with the password recovery, when I try to ask for a password recovery this happens:我有一台从 GitHub 运行文书工作的虚拟机,我在我的组织中使用它供用户写笔记,但现在我遇到了密码恢复问题,当我尝试要求恢复密码时,会发生这种情况:

I'm getting the 'Cannot send message without a sender address' exception from the swift mailer, I can't seem to find where to set up the sender address.我从 swift 邮件程序收到“没有发件人地址就无法发送邮件”异常,我似乎找不到设置发件人地址的位置。

I have tried to specify the sender in the message creation function in message.php as $this->setFrom('email@example.com');我试图在message.php的消息创建函数中将发件人指定为$this->setFrom('email@example.com'); This makes the exception go away but I don't receive any password recovery mail sent to my inbox.这使得异常消失,但我没有收到任何发送到我的收件箱的密码恢复邮件。

You need to make sure you have set the from in app/config/mail.php您需要确保在app/config/mail.php设置了from

'from' => ['address' => 'myname@gmail.com', 'name' => 'myname']

And don't forget to do php artisan config:cache after.并且不要忘记在之后执行php artisan config:cache

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM