From 781f341b21f1cc76f5a9cb7ef8df21d27d09800d Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 16 Dec 2008 07:37:05 -0500
Subject: [PATCH] #1485607: fix charset setting for attachments when sending the message
---
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 ab7dda3..7427a10 100644
--- a/program/lib/Mail/mimePart.php
+++ b/program/lib/Mail/mimePart.php
@@ -185,6 +185,9 @@
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 @@
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']}\"";
}
}
--
Gitblit v1.9.1