title: PHP bad mail headers
body: <p>I want to send an email via the <code>mail()</code> function.</p>
  
  <p><code>mail($to,$subject,$message)</code> works fine.</p>
  
  <p>But using <code>mail($to,$subject,$message,$header)</code> doesn't work.
  The header is:</p>
  
  <pre><code>Date: Tue, 2 Jul 2013 15:01:49 +0200 +0200
  Return-Path: noreply@myhost.com
  From: "noreply@myhost.com"
  Message-ID:
  X-Priority: 3
  X-Mailer: PHPMailer 5.2.4 (http://code.google.com/a/apache-extras.org/p/phpmailer/)
  MIME-Version: 1.0
  Content-Transfer-Encoding: 8bit
  Content-Type: text/html; charset=UTF-8
  </code></pre>
  
  <p>What is wrong with my headers?
  FYI, the headers are generated by PHPMailer.
  The code I use to send it is:</p>
  
  <pre><code>$mail = new PHPMailer();
  $mail-&gt;IsMail();
  $mail-&gt;From = $from;
  $mail-&gt;FromName = $from;
  $mail-&gt;AddAddress($to);
  $mail-&gt;IsHTML(true);
  $mail-&gt;CharSet = 'UTF-8';
  $mail-&gt;Subject = $subject;
  $mail-&gt;Body = $message;
  $mail-&gt;Send();
  </code></pre>