diff --git a/program/include/rcmail_attachment_handler.php b/program/include/rcmail_attachment_handler.php index 4d370c0fe55..f0d72f0216d 100644 --- a/program/include/rcmail_attachment_handler.php +++ b/program/include/rcmail_attachment_handler.php @@ -199,7 +199,8 @@ public function body($size = null, $fp = null) $result = fwrite($fp, $result) !== false; } } elseif ($this->message) { - $result = $this->message->get_part_body($this->part->mime_id, $this->part->ctype_primary === 'text', 0, $fp); + $formatting_wanted = $this->part->ctype_primary === 'text' && !$this->download; + $result = $this->message->get_part_body($this->part->mime_id, $formatting_wanted, 0, $fp); // check connection status if (!$fp && $this->size && empty($result)) {