summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-04-02 19:48:32 +0200
committerAleksander Machniak <alec@alec.pl>2013-04-02 19:48:32 +0200
commita389ffbb46d51d70fda99b1a3e043cd4f3f41ea1 (patch)
tree00f9a42f954cd536ac5eddf0cca8e9f0a8a49eb9 /program
parent8e4b49c382817723f4532b39aca06a7d41383f00 (diff)
Skip message/rfc822 attachments only in reply mode
Diffstat (limited to 'program')
-rw-r--r--program/steps/mail/compose.inc6
1 files changed, 4 insertions, 2 deletions
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