Skip to content

Commit

Permalink
Format/convert only text-parts that are displayed, not downloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
pabzm committed Jan 16, 2025
1 parent 6b8ee76 commit b87b27e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion program/include/rcmail_attachment_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit b87b27e

Please sign in to comment.