【发布时间】:2015-01-23 21:45:33
【问题描述】:
我正在尝试为我的网站构建验证邮件,但我似乎无法让 PHPmailer 包含 html 和 php。我可以使用正确的正文将验证邮件发送到正确的邮件地址,代码如下:
$mail->Body = 'Please verificate your account by clicking on the following link: http:localhost/confirm.php?passkey=' . $confirm_code;
现在我试图让邮件中的链接成为一个实际的链接,我试过这个(见下面的代码)但是没有用
$mail->Body = 'Please verificate your account by clicking on the following link: <a href=\"http:localhost/confirm.php?passkey= . $confirm_code\">http:localhost/confirm.php?passkey=' . $confirm_code . '</a>';
我已将 PHPmailer 设置为使用 html 发送电子邮件:
$mail->Debugoutput = 'html';
谁能告诉我这里有什么问题?
【问题讨论】: