Please help,
When I sent an email like this:
test body
next line
it came to my email like this:
test body\r\nnext line\r\nwww.google.co.uk
here is my code:
When I sent an email like this:
test body
next line
it came to my email like this:
test body\r\nnext line\r\nwww.google.co.uk
here is my code:
PHP Code:
<?php
mysql_connect("xxx", "xxx", "xxx");
mysql_select_db("xxx");
$EmailTitle = mysql_real_escape_string($_POST['EmailTitle']);
$EmailBody = mysql_real_escape_string($_POST['EmailBody']);
$id = mysql_real_escape_string($_POST['id']);
$query5 = mysql_query("SELECT * FROM aarbookts_booking_bookings WHERE id = '$id'");
$row5 = mysql_fetch_array($query5);
$customer_name = $row5['customer_name'];
$to = $row5['customer_email'];
$subject = $EmailTitle;
echo $to;
$message = <<<EOF
<html>
<body>
<p>$EmailBody</p>
</body>
</html>
EOF;
//end of message
$headers = "From: [email protected]\r\n";
$headers .= "Content-type: text/html\r\n";
//options to send to cc+bcc
//$headers .= "Cc: [email][email protected][/email]";
//$headers .= "Bcc: [email][email protected][/email]";
// now lets send the email.
mail($to, $EmailTitle, $message, $headers);
$msg = "Mass email sent";
header("Location: send-mass-email.php?msg=$msg");
?>
Comment