From 723cde09057878c6ae6fd361c3456d4a4b26a8bd Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Wed, 11 Mar 2009 22:38:15 +0000 Subject: [PATCH] sendmail.php: - encode Subject with mb_encode_mimeheader https://sourceforge.net/tracker2/?func=detail&atid=937964&aid=2682897&group_id=191583 git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@573 a1433add-5e2c-0410-b055-b7f2511e0802 --- sendmail.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sendmail.php b/sendmail.php index 8b12c7db..19a6d1a5 100644 --- a/sendmail.php +++ b/sendmail.php @@ -45,7 +45,8 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") $fHeaders = "To: " . $fTo . "\n"; $fHeaders .= "From: " . $fFrom . "\n"; - $fHeaders .= "Subject: " . encode_header(safepost('fSubject')) . "\n"; + mb_internal_encoding("UTF-8"); + $fHeaders .= "Subject: " . mb_encode_mimeheader( safepost('fSubject'), 'UTF-8', 'Q') . "\n"; $fHeaders .= "MIME-Version: 1.0\n"; $fHeaders .= "Content-Type: text/plain; charset=utf-8\n"; $fHeaders .= "Content-Transfer-Encoding: 8bit\n";