diff options
author | alecpl <alec@alec.pl> | 2008-12-16 12:37:05 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-12-16 12:37:05 +0000 |
commit | 781f341b21f1cc76f5a9cb7ef8df21d27d09800d (patch) | |
tree | f4ef7672fd3c1c67793e30917d4ed20bed03d414 /program/lib/Mail | |
parent | a2efac5e7bc1951799517c3c63559166d11d0768 (diff) |
#1485607: fix charset setting for attachments when sending the message
Diffstat (limited to 'program/lib/Mail')
-rw-r--r-- | program/lib/Mail/mimePart.php | 5 |
1 files changed, 3 insertions, 2 deletions
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']}\""; } } |