#23192 [NEW]: mb_encode_mimeheader mangles long lines?
From: jc at mega-bucks dot co dot jp
Operating system: Red Hat Linux 8.0
PHP version: 4.3.2RC1
PHP Bug Type: mbstring related
Bug description: mb_encode_mimeheader mangles long lines?
I am using mb_encode_mimeheader() and it seems that the function does not
work properly on long subject lines ...
$headers = "MIME-Version: 1.0\n" ;
$headers .= "From: $from <$from_email>\r\n";
$headers .= "Reply-To: $from <$from_email>\r\n";
$headers .= "Content-Type: text/plain;charset=ISO-2022-JP\n";
$body = mb_convert_encoding($body, "ISO-2022-JP","AUTO");
$subject =
"【tokyo-avland】公的証明書の送付期限のお知らせ";
/*
If I cut the subject to be
$subject =
"【tokyo-avland】公的証明書の送付";
There is no problem. Problems occur if I I put characters
after this ... This doens't work either:
$subject =
"【tokyo-avland】公的証明書の送付";
$subject .=
"期限のお知らせ";
*/
mb_language("ja");
$subject = mb_convert_encoding($subject, "ISO-2022-JP","AUTO");
$subject = mb_encode_mimeheader($subject);
mail($to, $subject, $body, $headers, $sendmail_params);
The mail I receive has the following subject line:
Subject:
=?ISO-2022-JP?B?GyRCIVobKEJ0b2t5by1hdmxhbmQbJEIhWzh4RSo+WkxAPXEkTkF3SVU0?=
=?ISO-2022-JP?B?fDhCJE4kKkNOJGkkOxsoQg==?=
--
Edit bug report at http://bugs.php.net/?id=23192&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23192&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23192&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23192&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23192&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23192&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23192&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23192&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23192&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23192&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23192&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23192&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23192&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23192&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23192&r=gnused
Thread (6 messages)
- jc at mega-bucks dot co dot jp