|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21985 mb_send_mail() doesn't encode the message body into MIME base64
Submitted: 2003-01-31 11:36 UTC Modified: 2003-02-18 12:54 UTC
From: hayk at softerra dot com Assigned:
Status: Closed Package: mbstring related
PHP Version: 4.3.0 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
49 - 32 = ?
Subscribe to this entry?

 [2003-01-31 11:36 UTC] hayk at softerra dot com
I'm trying to send a UTF-8 encoded e-mail using mb_send_mail() under PHP 4.3.0 with the MBString extension. 

mb_send_mail() adds the following lines to the e-mail header:
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: BASE64

But it doesn't encode the message body into MIME base64 and I'm forced to use 
mb_send_mail($address, $subject, chunk_split(base64_encode($msg)), $extra_headers);

instead of

mb_send_mail($address, $subject, $msg, $extra_headers);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-01 03:02 UTC]
Thanks for the report.

Changing status [Open => Verified]

 [2003-02-18 12:54 UTC]
This bug has been really fixed in CVS.

Now you can override the hard-coded headers such as Content-Type and Content-Transfer-Encoding by the additional header parameter.


mb_send_mail("", "subject", "any contents", "Content-Type: text/html; charset=utf-8");

I'm afraid the fix won't be available in the next release, but in php5.

You can try the latest CVS snapshot (unstable) which you can fetch at .

Thank you for the report and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 10:01:29 2024 UTC