When a part is explicitly marked as an attachment, obey.
[banana.git] / banana / mimepart.inc.php
index 28281e9..032ae4d 100644 (file)
@@ -183,6 +183,10 @@ class BananaMimePart
             }
         }
         list($type, $subtype) = explode('/', $content_type);
+        if ($disposition == 'attachment') {
+            $this->makeDataPart($content, $content_type, $encoding, $filename, $disposition, $id);
+            return;
+        }
         switch ($type) {
           case 'text': case 'message':
             $this->makeTextPart($content, $content_type, $encoding, $charset, $format);