From f7c11e862f002d0cd03f2eb4bae10ce3de69dfd2 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 17 Sep 2012 04:48:15 -0400
Subject: [PATCH] List related text/html part as attachment in plain text mode (#1488677)

---
 program/include/rcube_message.php |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index 6af1d01..fe2fcf3 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -494,8 +494,13 @@
                     }
 
                     // list as attachment as well
-                    if (!empty($mail_part->filename))
+                    if (!empty($mail_part->filename)) {
                         $this->attachments[] = $mail_part;
+                    }
+                    // list html part as attachment (here the part is most likely inside a multipart/related part)
+                    else if ($this->parse_alternative && ($secondary_type == 'html' && !$this->opt['prefer_html'])) {
+                        $this->attachments[] = $mail_part;
+                    }
                 }
                 // part message/*
                 else if ($primary_type == 'message') {

--
Gitblit v1.9.1