php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45486 mb_send_mail(); header 'Content-Type: text/plain; charset=' parsing incorrect
Submitted: 2008-07-11 11:33 UTC Modified: 2008-07-11 13:49 UTC
From: serovov at gmail dot com Assigned:
Status: Closed Package: mbstring related
PHP Version: 5.2.6 OS: *
Private report: No CVE-ID: None
 [2008-07-11 11:33 UTC] serovov at gmail dot com
Description:
------------
When executing mb_send_mail with headers 
<?
$headers = 'Content-Type: text/plain; charset="UTF-8"';
mb_send_mail('name@example.org', 'The Bug', 'Bla bla bla', $headers);
?>

Error: "Unsupported charset ""UTF-8"" - will be regarded as ascii"

But when i pass charset=UTF-8 its works Okey...


Reproduce code:
---------------
<?
$headers = 'Content-Type: text/plain; charset="UTF-8"';
mb_send_mail('name@example.org', 'The Bug', 'Bla bla bla', $headers);
?>

Expected result:
----------------
ignore quotes in Content-Type: text/plain; charset="UTF-8"

Actual result:
--------------
Error: "Unsupported charset ""UTF-8"" - will be regarded as ascii"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-11 13:49 UTC] felipe@php.net
This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC