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';
}
有誰知道什麼是錯?
謝謝!
'