php.net |  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:
 [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);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

Changing status [Open => Verified]



 [2003-02-18 12:54 UTC] moriyoshi@php.net
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.

example: 

mb_send_mail("user@example.com", "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 http://snaps.php.net/ .

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

 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 22:02:16 2014 UTC