|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: s dot mccleary at operon dot com
New email:
PHP Version: OS:


 [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()"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-05 16:35 UTC]
Please try using this CVS snapshot:
For Windows:

Or better yet a PHP 4.2.3RC before we release it. 
 [2002-09-26 19:52 UTC]
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
In case this was a documentation problem, the fix will show up soon at

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

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 17:01:31 2024 UTC