note 64982 rejected from function.mb-encode-mimeheader by bjori
| From: | bjori@php.net | Date: | Mon, 24 Apr 2006 09:18:31 +0000 |
| Subject: | note 64982 rejected from function.mb-encode-mimeheader by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-109305@lists.php.net to get a copy of this message | ||
Note Submitter: hcmhongan2 at yahoo dot co dot jp
----
mb_encode_mimeheader DOESN'T WORK!!!!
Here is how I had to solve this problem. This solution is specific for Japanese emails.
The variable $subject is the subject of an email.
$enc = mb_detect_encoding($subject);
$subject = mb_convert_encoding($subject,"ISO-2022-JP",$enc);
$subject = base64_encode($subject);
$subject = "=?ISO-2022-JP?B?" . $subject . "?=";