问题描述
我正在尝试发送一封电子邮件,其中包含我拥有的 mandrill 模板和“addgod / laravel-mandrill-template”库。 (Laravel 7.x) 但是当我发送电子邮件时,我什么也没收到,但我也没有错误。
我的实施方式是否正确?
另外:我的密钥已经在 .env 中
谢谢!
代码:
public function mandrillmail()
{
$template = new Template('demo-template'); //This is the name of my template in mandrill
$message = new Message();
$message
->setSubject('Demo email')
->setFromEmail('from@mail.com')
->setFromName('John Doe')
->setMergeVars(['welcome' => 'Welcome,this is a line.']);
$message->addRecipient(new Recipient('to@mail.com','Example Name',Type::TO));
MandrillTemplateFacade::send($template,$message);
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)