Index: t3lib/class.t3lib_div.php =================================================================== --- t3lib/class.t3lib_div.php (revision 5723) +++ t3lib/class.t3lib_div.php (working copy) @@ -5122,7 +5122,14 @@ default: $qpValue = t3lib_div::quoted_printable($part,1000); if ($part!=$qpValue) { - $qpValue = str_replace(' ','_',$qpValue); // Encoded words in the header should not contain non-encoded spaces. "_" is a shortcut for "=20". See RFC 2047 for details. + /** + * Encoded words in the header should not contain non-encoded: + * - spaces. "_" is a shortcut for "=20". See RFC 2047 for details. + * - question mark. See RFC 1342 (http://tools.ietf.org/html/rfc1342) + */ + $search = array(' ','?'); + $replace = array('_','=3F'); + $qpValue = str_replace($search, $replace, $qpValue); $part = '=?'.$charset.'?Q?'.$qpValue.'?='; } break;