title: UTF-8 emails to Mac Mail and Gmail
body: <p>I'm using Pear mail_mime to send HTML emails out, and first the UTF-8 characters were messed up in Gmail, but not in Mac Mail. I discovered that I needed to add parameters to the get() function to correct the character set used in the HTML portion of the MIME message. It was defaulting to ISO.</p>
  
  <p>So, I've corrected this problem, the email source looks correct, Gmail is working fine, but now inexplicably Mac Mail is having an issue, despite it working before with the wrong declared character set. I've tried a bunch of different things, including going back to the wrong character set, but Mac Mail still won't render the message properly.</p>
  
  <p>Does anyone have any ideas on what could be causing this?</p>
  
  <p>Here's the code, the HTML is set before this:</p>
  
  <pre><code>$params["host"] = "xxx";
  $params["auth"] = true;
  $params["username"] = "xxx";
  $params["password"] = "xxx";
  $params["html_charset"] = "utf-8";
  $params["head_charset"] = "utf-8";
  $params["text_charset"] = "utf-8";
  
  $text = 'Text version of email';
  $crlf = "\n";
  
  $hdrs = array(
          'From'    =&gt; 'xxx',
          'Subject' =&gt; 'xxx'
          );
  
  $mime = new Mail_mime($crlf);
  
  $mime-&gt;setTXTBody($text);
  $mime-&gt;setHTMLBody($html);
  
  $body = $mime-&gt;get($params);
  $hdrs = $mime-&gt;headers($hdrs);
  
  $mail =&amp; Mail::factory('smtp', $params);
  $send = $mail-&gt;send($to, $hdrs, $body);
  if (PEAR::isError($send)) { print($send-&gt;getMessage());} else echo "Mail sent to: $to";
  </code></pre>