php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19182 mb_send_mail not changing encoding properly
Submitted: 2002-08-29 19:55 UTC Modified: 2002-09-26 19:52 UTC
From: s dot mccleary at operon dot com Assigned:
Status: Closed Package: mbstring related
PHP Version: 4.2.2 OS: Red Hat Linux 7.2
Private report: No CVE-ID: None
 [2002-08-29 19:55 UTC] s dot mccleary at operon dot com
Red Hat Linux 7.2
Apache 1.3.26
PHP 4.2.2
P3 500mhz

Web site has not only Japanese and English, but also German, French and Italian content.

Using SJIS for Japanese Encoding, ISO-8955-1 for everything else.  Internal encoding, http input and http output.

I set in php.ini to override the mail() function with mb_send_mail().

When the language was set to "Japanese" it worked fine for sending Japanese email.

When the language was set to "English" it wouldn't display western european characters such as umlauts and accents in the resulting email.  Since setting the language to "English" before calling this function is supposed to make it use ISO-8955-1, it should have displayed those characters fine, just as it did with HTTP output.

Workaround: Tell PHP not to override mail() with mb_send_mail(), and instead pass an additional header to mail() saying "'Content-Type: text/plain; charset=' . mb_internal_encoding()"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-05 16:35 UTC] kalowsky@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

Or better yet a PHP 4.2.3RC before we release it. 
 [2002-09-26 19:52 UTC] sniper@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jan 28 03:01:24 2020 UTC