From 334784a051f44d75642e50a40684f93812a652b4 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(-) diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 5346959bd..b75ac5280 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -986,10 +986,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