我无法使用PHPMailer发送Html电子邮件

I am trying to send HTML emails using PHP Mailer. But it is not sending. Here is my code:

$mail->From = $from;
$mail->FromName = $fromname;
$mail->addAddress($to, $toname);     // Add a recipient
$mail->IsHTML(true);
$mail->Subject = $subject;
$mail->Body    = "`<a href='www.google.com'>click here  </a>`";
if(!$mail->send()) {
   echo 'Message could not be sent.';
   echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
   echo 'Message Sent';
}

And one more if I am sending text messages it works fine. But in Html it is not sending email and show me the message

Try this:

$mail->From = $from;
$mail->FromName = $fromname;
$mail->addAddress($to, $toname);     // Add a recipient
$mail->IsHTML(true);
$mail->Subject = $subject;
$message = '<html><body><a href='www.google.com'>click here  </a></body></html>';
$mail->Body= $message;
if(!$mail->send()) {
   echo 'Message could not be sent.';
   echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
   echo 'Message Sent';
}