提问人:andres castellanos 提问时间:11/1/2023 最后编辑:andres castellanos 更新时间:11/1/2023 访问量:19
Phalcon - Swiftmailer发送带有活动邀请的电子邮件
Phalcon - Swiftmailer send email with invitation of event
问:
我正在尝试在Phalcon上发送一封电子邮件,添加一个带有活动的邀请。这是我的后端版本:
"phalcon/devtools": "^4.0",
"phalcon/migrations": "^1.2",
"swiftmailer/swiftmailer": "^6.0",
现在我可以发送电子邮件并附上文档。
$mailer = new Swift_Mailer($transport);
$message = (new Swift_Message($subject))
->setFrom([$from['email']=> $from['name'] ])
->setTo([$send_to['email'] => $send_to['name']])
->setBody($template, 'text/html');
$mailer->send($message);
我不知道是否只需添加文件 .ics 这有效?
答: 暂无答案
评论
->attach(Swift_Attachment::fromPath('file.ics'))
->setbody