summaryrefslogtreecommitdiff
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:49:32 +0200
commit334784a051f44d75642e50a40684f93812a652b4 (patch)
tree1a27c163285f2cbec7344c499c6b90da3ccdd355
parentd74b4106976a776c28c73fa8d6f65279b264d2ec (diff)
Skip message/rfc822 attachments only in reply mode
-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 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