From a389ffbb46d51d70fda99b1a3e043cd4f3f41ea1 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 2 Apr 2013 19:48:32 +0200 Subject: Skip message/rfc822 attachments only in reply mode --- program/steps/mail/compose.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'program/steps') diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index cc7cf687f..36c6d9622 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -997,10 +997,12 @@ function rcmail_write_compose_attachments(&$message, $bodyIsHtml) foreach ((array)$message->mime_parts as $pid => $part) { if ($part->disposition == 'attachment' || ($part->disposition == 'inline' && $bodyIsHtml) || $part->filename) { - if (($part->ctype_primary == 'message' && $bodyIsHtml) || $part->ctype_primary == 'multipart') { + // skip parts that aren't valid attachments + if ($part->ctype_primary == 'multipart' || $part->mimetype == 'application/ms-tnef') { continue; } - if ($part->mimetype == 'application/ms-tnef') { + // skip message attachments in reply mode + if ($part->ctype_primary == 'message' && $compose_mode == RCUBE_COMPOSE_REPLY) { continue; } // skip inline images when forwarding in plain text -- cgit v1.2.3