|
|
|
@ -679,9 +679,10 @@ class rcube_message
|
|
|
|
|
$this->parse_alternative = false;
|
|
|
|
|
|
|
|
|
|
// if plain part was found, we should unset it if html is preferred
|
|
|
|
|
if ($this->opt['prefer_html'] && count($this->parts))
|
|
|
|
|
if ($this->opt['prefer_html'] && count($this->parts)) {
|
|
|
|
|
$plain_part = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// choose html/plain part to print
|
|
|
|
|
if ($html_part !== null && $this->opt['prefer_html']) {
|
|
|
|
@ -697,8 +698,16 @@ class rcube_message
|
|
|
|
|
// add the right message body
|
|
|
|
|
if (is_object($print_part)) {
|
|
|
|
|
$print_part->type = 'content';
|
|
|
|
|
|
|
|
|
|
// Allow plugins to handle also this part
|
|
|
|
|
$plugin = $this->app->plugins->exec_hook('message_part_structure',
|
|
|
|
|
array('object' => $this, 'structure' => $print_part,
|
|
|
|
|
'mimetype' => $print_part->mimetype, 'recursive' => true));
|
|
|
|
|
|
|
|
|
|
if (!$plugin['abort']) {
|
|
|
|
|
$this->add_part($print_part);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// show plaintext warning
|
|
|
|
|
else if ($html_part !== null && empty($this->parts)) {
|
|
|
|
|
$c = new stdClass;
|
|
|
|
|