From 781f341b21f1cc76f5a9cb7ef8df21d27d09800d Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 16 Dec 2008 12:37:05 +0000 Subject: #1485607: fix charset setting for attachments when sending the message --- program/lib/Mail/mimePart.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'program/lib/Mail') diff --git a/program/lib/Mail/mimePart.php b/program/lib/Mail/mimePart.php index ab7dda30f..7427a1002 100644 --- a/program/lib/Mail/mimePart.php +++ b/program/lib/Mail/mimePart.php @@ -185,6 +185,9 @@ class Mail_mimePart { if (isset($contentType['type'])) { $headers['Content-Type'] = $contentType['type']; + if (isset($contentType['charset'])) { + $headers['Content-Type'] .= "; charset=\"{$contentType['charset']}\""; + } if (isset($contentType['name'])) { $headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF; $headers['Content-Type'] .= @@ -192,8 +195,6 @@ class Mail_mimePart { isset($contentType['charset']) ? $contentType['charset'] : 'US-ASCII', isset($contentType['language']) ? $contentType['language'] : NULL, isset($params['name-encoding']) ? $params['name-encoding'] : NULL); - } elseif (isset($contentType['charset'])) { - $headers['Content-Type'] .= "; charset=\"{$contentType['charset']}\""; } } -- cgit v1.2.3