|  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: hayk at softerra dot com
New email:
PHP Version: OS:


 [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: Fri Apr 19 19:01:28 2024 UTC