From:             quasar at aero dot ist dot utl dot pt
Operating system: Linux
PHP version:      5.2.1
PHP Bug Type:     mbstring related
Bug description:  mb_send_mail does not encode subject correctly

Description:
------------
When trying to send an e-mail with international character in the subject,
mb_send_mail is expected to fully encode the subject string. However it
only encodes the string form the first word containing the interantional
characters on.

Reproduce code:
---------------
// Assuming $to, $message and $headers already defined
$subject = "hello ãll";
mb_send_mail($to, $subject, $message, $headers);

Expected result:
----------------
A fully encoded Subject header, in the form:

Subject: ?UTF-8?B?SOMETHING?=

Actual result:
--------------
Received e-mail relevant headers, as you can see the hello part of the
string, which has no international, characters is left unencoded:

Subject: hello =?UTF-8?B?w6NsbA==?=
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit
Mime-Version: 1.0

-- 
Edit bug report at http://bugs.php.net/?id=40923&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40923&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40923&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40923&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40923&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40923&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40923&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40923&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40923&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40923&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40923&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40923&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40923&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40923&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40923&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40923&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40923&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40923&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40923&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40923&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40923&r=mysqlcfg

Reply via email to