使用PHP Mail格式化HTML

I've been working through this thread here: Sending HTML email from PHP

For the last 5 hours and for some reason cannot get my PHP to generate HTML mail.

Here's what I have:

// Construct Mail:
$message = "<html><body>Some text<br />New line<p>New para</p></body></html>";
// Send Mail:
$to         = "$UserMail";
$subject        = "[Skills Exchange Network] Event Created";
$header     = 'MIME-Version: 1.0' . "
";
$header     .= 'Content-Type: text/html; charset=ISO-8859-1' . "
";
$headers    .= 'From: Skills Exchange Network <Mail Address is here>' . "
";
$headers    .= 'Cc: Skills Exchange Network <Mail Address is here>' . "
";
$SendMail   = mail($to,$subject,$message,$headers);

Here's what I receive:

From Skills Exchange Network rnCc: Skills Exchange Network rn

I'm truly at a loss...

Here's what I have now:

// Construct Mail:
$message = "<html><body>Some text<br />New line<p>New para</p></body></html>";

// Send Mail:
$to         = "$UserMail";
$subject        = "[Skills Exchange Network] Event Created";

// To send HTML mail, the Content-type header must be set
$headers     = "MIME-Version: 1.0" . "
";
$headers    .= "Content-Type: text/html; charset=ISO-8859-1" . "
";

// Additional Headers:
$headers    .= "From: Skills Exchange Network <info@skillsexchangenetwork.net>" . "
";
$headers    .= "Cc: Skills Exchange Network <info@skillsexchangenetwork.net>" . "
";
$SendMail   = mail($to, $subject, $message, $headers);

And here's what I receive:

Subject: [Skills Exchange Network] Event Created
MIME-Version: 1.0rnContent-Type: text/html; charset=ISO-8859-1rnFrom: Skills Exchange     Network <info@skillsexchangenetwork.net>rnCc: Skills Exchange Network <info@skillsexchangenetwork.net>rn
Message-Id: <E1UzptE-0003e1-Fs@wdt.webserversystems.com>
From: skillsex@wdt.webserversystems.com
Date: Thu, 18 Jul 2013 10:13:08 -0500
X-Antivirus: AVG for E-mail 2013.0.3349 [3204/6500]
X-AVG-ID: ID58DD9571-36429B43

<html><body>Some text<br />New line<p>New para</p></body></html>

Maybe if you put the 's' consequently at the end of $header?

You are naming $headers as $header and because of that your content-type is not embedding.

$headers     = 'MIME-Version: 1.0' . "
";
$headers    .= 'Content-Type: text/html; charset=ISO-8859-1' . "
";
$headers    .= 'From: Skills Exchange Network <Mail Address is here>' . "
";
$headers    .= 'Cc: Skills Exchange Network <Mail Address is here>' . "
";

PHPMailer could be a useful solution.