User Notes:
Note by: jasmo@varikas.fi
At least in my case, setting Content-Type headers first and then passing headers to headers() allowing it overwrite old headers does not work properly.
$mime->headers($headers, true);
It just didn't overwrite the content-type header, but added other one.
If you are having problems that Outlook does not show mime-content right but other programs work, be sure that you don't set Content-Type headers before passing headers to headers()
Note by: NWdev
It appears Mail_mime adds the \r\n to the individual headers via the _encodeHeaders function (mime.php in version 1.5.2) -- so you can avoid spinning your wheels by not adding them again to your header values:
This:
<code>
$headers['Subject'] = "Your Order Information";
</code>
Not this:
<code>
$headers['Subject'] = "Your Order Information\r\n";
</code>
Note by: dcasper@pressaprint.com
I ran into this so others may as well. When attempting to assign a custom Content-Type header to your messages you need to remember to call the function as
$mime->headers($hdrs, true);
In order to get your custom header to get used. There's a default Content-Type header of text/plain that only gets replaced if you pass along the $overwrite boolean as true.
Note by: Stephen Dewey
Note that although this page omits it, you should still add the To field explicitly using this function.