summaryrefslogtreecommitdiff
path: root/program/steps/mail/compose.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r--program/steps/mail/compose.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index f167053de..8d43de050 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -601,9 +601,8 @@ function rcmail_write_compose_attachments(&$message, $bodyIsHtml)
$cid_map = array();
foreach ((array)$message->mime_parts as $pid => $part)
{
- if (($part->ctype_primary != 'message' || !$bodyIsHtml) &&
- ($part->disposition=='attachment' || $part->disposition=='inline' || $part->headers['content-id']
- || (empty($part->disposition) && $part->filename)))
+ if (($part->ctype_primary != 'message' || !$bodyIsHtml) && $part->filename &&
+ ($part->disposition=='attachment' || ($part->disposition=='inline' && $bodyIsHtml) || (empty($part->disposition))))
{
if ($attachment = rcmail_save_attachment($message, $pid)) {
$_SESSION['compose']['attachments'][$attachment['id']] = $attachment;