I am trying to send emails from PHPMailer. Everything is working but the problem is it is sending emails along with HTML tags even after writing $mail->IsHTML(true);
. Below is my code for sending emails.
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
$mail->SMTPSecure = EMAIL_COMPOSE_SECURE;
$mail->Host = EMAIL_COMPOSE_SMTP_HOST;
$mail->Port = EMAIL_COMPOSE_PORT;
$mail->Username = EMAIL_COMPOSE_OUTGOING_USERNAME;
$mail->Password = EMAIL_COMPOSE_OUTGOING_PASSWORD;
$mail->SetFrom(EMAIL_COMPOSE_INCOMING_USERNAME);
$mail->Subject =$subject;
$mail->Body = $message;
$mail->IsHTML(true);
$mail->AddAddress($email_to);
if(!$mail->Send()){
echo "Mailer Error: " . $mail->ErrorInfo;
}
else{
echo "Message has been sent";
}
And one more thing I will mention, in my application text editor for writing the emails is ckeditor. Will that cause any problem? Please help.