note 97847 deleted from function.mail by danbrown
| From: | danbrown@php.net | Date: | Wed, 12 May 2010 14:04:13 +0000 |
| Subject: | note 97847 deleted from function.mail by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169185@lists.php.net to get a copy of this message | ||
Note Submitter: zhangjiayin99 at gmail dot com
----
function mail_utf8($to, $subject = '(No subject)', $message = '', $from,
$from_name) {
$header = 'MIME-Version: 1.0' . "\n" . 'Content-type: text/plain;
charset=UTF-8'
. "\n" . 'From: "'. '=?UTF-8?B?' .
base64_encode($from_name) . '?=' . '" <' . $from . ">\n";
mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header);
}
I see the function some one wrote ,
when I use it , it look like good for mail body with chinese , but the from name, so I change it
,the from name should be encode, I really didn't know why mb_encode_mimeheader not effected