title: PHP Mail() Function with headers
body: <p>I always struggle when using headers along with the PHP mail() function.
  The problem is always the same, last year, this time, as long as I remember, it drives me mad.</p>
  
  <p>The problem is that the headers are simply displayed in the email message.</p>
  
  <p><strong>Example received mail :</strong></p>
  
  <p><a href="http://nl.tinypic.com/view.php?pic=63va5z&amp;s=8#.U8PmeED8rbw" rel="nofollow">http://nl.tinypic.com/view.php?pic=63va5z&amp;s=8#.U8PmeED8rbw</a></p>
  
  <p><strong>Source :</strong> </p>
  
  <pre><code>$onderwerp = "Bedankt voor uw bestelling met order nummer # ".$row['id'];
  $ontvanger = "customer@customer.be";
  $reply = "reply@reply.be";
  //$reply = htmlspecialchars($_POST['je_email']); 
  
  $headers = "Content-type: text/html; charset=iso-8859-1\r\n"; 
  $headers .= "MIME-Version: 1.0\r\n";    
  
  $headers .= "Reply-To: Webmaster &lt; reply@website.be &gt;\r\n"; // reply-adres
  //$headers .= "Cc:  webmaster@website.be , crewlid@website.be \r\n"; //copy
  //$headers .= "Bcc:  crew@website.be \r\n"; // blind copy
  $headers .= "From: TEST SOME NAME | GW8 &lt;$reply&gt;\r\n"; // de afzender van de mail
  $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n";
  $headers .= "X-Priority: 1\r\n"; // 3 voor onbelangrijk 
  $headers .= "Priority: Urgent\r\n";
  $headers .= "Importance: High\r\n"; // Low voor onbelangrijk
  $headers .= "X-MSMail-Priority: High\r\n"; // Low voor onbelangrijk  
  
  $bericht = "&lt;strong&gt;TEST&lt;/strong&gt;"; 
  
  mail($ontvanger,$onderwerp,$bericht,$headers);
  </code></pre>
  
  <p>Which snippet I use, always the same problem..
  Headers displayed in email content, as shown in screenshot.</p>
  
  <p>Does anybody know how I can fix this ? I have a strong feeling this is a server-side problem..</p>