PHP mail formatting issue - Why do CRLF header line endings break HTML email in Outlook?
I'm using the PHP native mail() function to send HTML emails and have a formatting problem in the users most common email client - Outlook 2007 ( in addition to some other email clients ) - all the html tags are exposed so it looks like gibberish to a non-web-developer. I'm sending HTML email the same way that the PHP manual demos it. Example: $message = get_HTML_email_with_valid_formatting(); $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=UTF-8\r\n"; $headers .= "From: example.com <info@example.com>\r\n"; $headers .= "Reply-To: donotreply@example.com\r\n";