I have problems with sending html based message with php mailer. Some answers here in stackoverflow says to include $mail->isHTML(true) which i do but no result.. here is the code
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';
}
Does anyone know what's wrong?
Thanks!