My php mail script is sending mail, but even with the headers telling it to be html, it ignores it and sends the mail as text. All the '\r\n' breaks end up being ignored and the $headers content pasted below the $body in the email. Below is the code.
//mail out copy
$to = $email;
$subject = 'Thank you for signing up to Learn to Play';
$headers = 'From: donotreply@xxx.com' . '\r\n';
Always set content-type when sending HTML email
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$body = 'Thank you for registering with us for your Learn to Play Table Games Lesson. Your registration has been confirmed for ';
$body .= $date_requested;
$body .= ' for a group of ';
$body .= $guests;
$body .= '. Please check in at the Guest Services Desk at 6:45PM where a member of our Table Games Team will meet you for your session. ';
$body .= 'Should there be any conflict with your reservation a member of our team will contact you to re-schedule your lesson.';
mail($to, $subject, $headers, $body) or die('Error sending mail');
}