【发布时间】:2014-07-07 11:19:47
【问题描述】:
我正在开发一个使用 Twig 和 PHPMailer 的网站。当系统发送电子邮件时,我希望该电子邮件的正文为 HTML。我必须在电子邮件正文中显示数据。我有文件personal.php,它通过Twig 将数据传递给文件personal.html
$twig->display('Personal.html',array(
"text" => $text,
"lenguaje" => substr($lang, 0, 2)
));
如何使用 Twig 传递 HTML 文件?当我传递数据时,我会这样做
$body = '<div>
<p>'.$this->text['pass_recov_body'].'</p>
<p><strong>'.$this->text['date_user'].'</strong></p>
<p><strong>'.$this->text['user'].': </strong>'. $data['txtRecEmail'] . '</p>
<p><strong>'.$this->text['password'].': </strong>'. $data['txtUsrPass'] . '</p>
</div>
';
$this->msgHTML($body);
但现在我想通过 CSS 传递一个 HTML 文件
【问题讨论】:
标签: php html css twig phpmailer