【发布时间】:2014-06-25 06:49:33
【问题描述】:
我有一个template file(html file)。我必须在我的邮件中包含这个模板。我如何使用swift mailer阅读模板。
我试过了
$emailBody = readTemplateFile("http://www.something.in/guitar-mail.html");
$emailBody_new = str_replace("#name#",$reg_fname,$emailBody);
$emailBody_new = str_replace("#email#",$url,$emailBody_new);
$message->setBody($emailBody_new);
但在邮件中,html 标签和css 显示为平面文本。我该怎么做??
【问题讨论】:
标签: php templates swiftmailer