and PHP Mailer to sent the contents to my e-mail.
But the e-mail does not appear to be in HTML form eventhough I put :
CODE
$mail->IsHTML(true); //set email format to HTML
Below is my code for sending e-mail:
CODE
require '../PHPMailerAutoload.php';
$mail = new PHPMailer();
$mail->IsSMTP(); //set mailer to use SMTP
$mail->Host = "mail.xxxyy.com"; //specify SMTP mail server
$mail->Port = "2525"; //specify SMTP Port
$mail->SMTPAuth = true; //turn on SMTP authentication
$mail->Username = "xxxxx@xxxxx.com"; //Full SMTP username
$mail->Password = "xxxxx"; //SMTP password
$mail->From = "xxxxx@xxx.com";
$mail->FromName = "xxxxx";
$mail->AddAddress("xxxxxx", "Mei Yi");
$mail->WordWrap = 50; //optional, you can delete this line
$mail->IsHTML(true); //set email format to HTML
$mail->Subject = "RE:". $_POST[txtFeedbackSubject2];
$mail->Body = htmlspecialchars($_POST['content']);
if(!$mail->Send())
{
echo "Message could not be sent.
";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
$mail = new PHPMailer();
$mail->IsSMTP(); //set mailer to use SMTP
$mail->Host = "mail.xxxyy.com"; //specify SMTP mail server
$mail->Port = "2525"; //specify SMTP Port
$mail->SMTPAuth = true; //turn on SMTP authentication
$mail->Username = "xxxxx@xxxxx.com"; //Full SMTP username
$mail->Password = "xxxxx"; //SMTP password
$mail->From = "xxxxx@xxx.com";
$mail->FromName = "xxxxx";
$mail->AddAddress("xxxxxx", "Mei Yi");
$mail->WordWrap = 50; //optional, you can delete this line
$mail->IsHTML(true); //set email format to HTML
$mail->Subject = "RE:". $_POST[txtFeedbackSubject2];
$mail->Body = htmlspecialchars($_POST['content']);
if(!$mail->Send())
{
echo "Message could not be sent.
";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
The e-mail content appears to be like this:
CODE
<span style=\"font-weight: bold; font-style: italic; text-decoration: underline;\">Aadadssdasadsad.</span>
How do I ensure that my e-mail recieve the sentences from summernote text area as bolded?
Please advice.
Thanks.