1
我有问题与PHP邮件发送基于html的消息。一些答案在这里说,计算器,包括$ MAIL-> isHTML(真),我做的,但没有结果..这里是代码PHPMailer不会发送html消息
require '...';
$mail = new PHPMailer;
$mail->isSMTP();
$mail->Host = '...';
$mail->SMTPAuth = true;
$mail->Username = '...';
$mail->Password = '...';
$mail->setFrom("....");
$mail->addAddress("...");
$mail->Subject = "...";
$mail->Body = "<li>abcd</li>";
$mail->isHTML(true);
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
有谁知道什么是错?
谢谢!
'