ZF-2684: Zend_Mail wrong encode of mail subject, if it contain underscore

Issue Type: Bug Created: 2008-02-18T23:56:27.000+0000 Last Updated: 2011-08-03T15:55:56.000+0000 Status: Resolved Fix version(s): - 1.5.2 (15/May/08)

Reporter: Akira Matsuoka (akira) Assignee: Satoru Yoshida (satoruyoshida) Tags: - Zend_Mail

Related issues: Attachments:


I cannot decode mail subject in Japanese at OutlookExpress and Gmail. I think encoding for '_' (underscore) is wrong.

function _encodeHeader() $quotedValue = str_replace(array('?', ' '), array('=3F', '=20'), $quotedValue);

fix like this $quotedValue = str_replace(array('?', ' ', '_'), array('=3F', '=20', '=5F'), $quotedValue);

I check correctly at OE and Gmail.

thank you

(Ref) The "Q" encoding defined in RFC2047 4.2.2 The 8-bit hexadecimal value 20 (e.g., ISO-8859-1 SPACE) may be represented as "_" (underscore, ASCII 95.). (This character may not pass through some internetwork mail gateways, but its use will greatly enhance readability of "Q" encoded data with mail readers that do not support this encoding.) Note that the "_" always represents hexadecimal 20, even if the SPACE character occupies a different code position in the character set in use.


Posted by old of Satoru Yoshida ( on 2008-04-14T08:50:40.000+0000

Thank you for report. Fixed in SVN r9222

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.