From d165d11012a3814b129b3dab6419212bad8e5872 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 22 Oct 2014 15:44:39 +0200 Subject: Fix so attachment charset is set in headers of forward/draft message (#1490109) --- program/steps/mail/compose.inc | 1 + program/steps/mail/sendmail.inc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'program') diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 2b1ca4de6..9b6d0dcc9 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -1377,6 +1377,7 @@ function rcmail_save_attachment(&$message, $pid) 'data' => $data, 'path' => $path, 'size' => $path ? filesize($path) : strlen($data), + 'charset' => $part->charset, ); $attachment = $rcmail->plugins->exec_hook('attachment_save', $attachment); diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index bac751298..68878d790 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -469,7 +469,8 @@ if (is_array($COMPOSE['attachments'])) { $attachment['data'] ? false : true, $ctype == 'message/rfc822' ? '8bit' : 'base64', 'attachment', - '', '', '', + $attachment['charset'], + '', '', $folding ? 'quoted-printable' : NULL, $folding == 2 ? 'quoted-printable' : NULL, '', RCUBE_CHARSET -- cgit v1.2.3