Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 1.0.3
-
Fix Version/s: None
-
Component/s: Zend_Mail
-
Labels:None
Description
In Zend_Mail::_encodeHeader() and Zend_Mail::setSubject().
Now, it is:
=?utf-8?Q?mikespook=20=E9=82=80=E8=AB=8B=E6=82=A8=E9=80=B2=E5=85=A5=20ecbattle.net=20=E7=?=9A=84=E4=B8=96=E7=95=8C=E5=85=A7?=
But should be:
=?utf-8?Q?mikespook=20=E9=82=80=E8=AB=8B=E6=82=A8=E9=80=B2=E5=85=A5=20ecbattle.net=20=E7=?=
=?utf-8?Q?9A=84=E4=B8=96=E7=95=8C=E5=85=A7?=
And if I modify the code in Zend/Mail.php line: 392.
protected function _encodeHeader($value)
{
if (Zend_Mime::isPrintable($value)) {
return $value;
} else {
$quotedValue = Zend_Mime::encodeQuotedPrintable($value);
$quotedValue = str_replace(array('?', ' '), array('=3F', '=20'), $quotedValue);
return '=?' . $this->_charset . '?Q?' . $quotedValue . '?=';
}
}
to:
protected function _encodeHeader($value)
{
if (Zend_Mime::isPrintable($value)) { return $value; } } else {
$quotedValue = Zend_Mime::encodeQuotedPrintable($value, 200);
$quotedValue = str_replace(array('?', ' '), array('=3F', '=20'), $quotedValue);
return '=?' . $this->_charset . '?Q?' . $quotedValue . '?=';
}
}
there will be no problem. but if it is longer than 200, the subject will be showed hash.
In the version 1.5, it also has this issue.