From 943771a3e42d61788f94e5375632af170dd14ec5 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 2 Oct 2014 10:04:45 +0000 Subject: [PATCH] * Mail: handle (and correct (if needed)) charset for subject on import of messages --- emailadmin/inc/class.emailadmin_imapbase.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/emailadmin/inc/class.emailadmin_imapbase.inc.php b/emailadmin/inc/class.emailadmin_imapbase.inc.php index b4d08c534e..7940fde7cd 100644 --- a/emailadmin/inc/class.emailadmin_imapbase.inc.php +++ b/emailadmin/inc/class.emailadmin_imapbase.inc.php @@ -6160,7 +6160,13 @@ class emailadmin_imapbase if (stripos($val,'calendar')) $contenttypecalendar = $val; break; case 'subject': - $mailObject->Subject = $mailObject->EncodeHeader($mailObject->SecureHeader($val)); +/* +error_log(__METHOD__.__LINE__.$val); +error_log(__METHOD__.__LINE__.$mailObject->SecureHeader($val)); +error_log(__METHOD__.__LINE__.translation::convert($mailObject->SecureHeader($val),false,$mailObject->CharSet)); +error_log(__METHOD__.__LINE__.$mailObject->EncodeHeader($mailObject->SecureHeader($val))); +*/ + $mailObject->Subject = $mailObject->EncodeHeader(translation::convert($mailObject->SecureHeader($val),false,$mailObject->CharSet)); $Header .= $mailObject->HeaderLine('Subject',$mailObject->Subject); break; default: