title: Email from PHP has broken Subject header encoding
body: <p>My PHP script sends email to users and when the email arrives to their mailboxes, the subject line (<code>$subject</code>) has characters like <code>a^£</code> added to the end of my subject text. This is obviously and encoding problem. The email message content itself is fine, just the subject line is broken.</p>
  
  <p>I have searched all over but can’t find <strong>how to encode my subject properly</strong>.</p>
  
  <p>This is my header. Notice that I’m using <code>Content-Type</code> with <code>charset=utf-8</code> and  <code>Content-Transfer-Encoding: 8bit</code>.</p>
  
  <pre><code>//set all necessary headers
  $headers = "From: $sender_name&lt;$from&gt;\n";
  $headers .= "Reply-To: $sender_name&lt;$from&gt;\n";
  $headers .= "X-Sender: $sender_name&lt;$from&gt;\n";
  $headers .= "X-Mailer: PHP4\n"; //mailer
  $headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
  $headers .= "MIME-Version: 1.0\n";
  $headers .= "X-MSMail-Priority: High\n";
  $headers .= "Importance: 3\n";
  $headers .= "Date: $date\n";
  $headers .= "Delivered-to: $to\n";
  $headers .= "Return-Path: $sender_name&lt;$from&gt;\n";
  $headers .= "Envelope-from: $sender_name&lt;$from&gt;\n";
  $headers .= "Content-Transfer-Encoding: 8bit\n";
  $headers .= "Content-Type: text/plain; charset=UTF-8\n";
  </code></pre>