PHP Send UTF-8 mail without PEAR :: Mail PEAR :: Mail_Mime
3 answers
The simplest solution, if you don't mind encoding even words that are not needed, is all that needs to be done in RFC 2047 base64 encoding:
$subject= "=?utf-8?b?".base64_encode($subject)."?=";
$body= "blah blah $utf8text blah";
$headers= "MIME-Version: 1.0\r\n";
$headers.= "From: =?utf-8?b?".base64_encode($fromname)."?= <$fromaddress>\r\n";
$headers.= "Content-Type: text/plain;charset=utf-8";
mail($toaddress, $subject, $body, $headers);
+4
source to share