| | |
| | | * Convert the given message part to proper HTML |
| | | * which can be displayed the message view |
| | | * |
| | | * @param object rcube_message_part Message part |
| | | * @param array Display parameters array |
| | | * @param rcube_message_part Message part |
| | | * @param array Display parameters array |
| | | * @return string Formatted HTML string |
| | | */ |
| | | function rcmail_print_body($part, $p = array()) |
| | |
| | | } |
| | | else { |
| | | // assert plaintext |
| | | $body = $part->body; |
| | | $body = $data['body']; |
| | | $part->ctype_secondary = $data['type'] = 'plain'; |
| | | } |
| | | |
| | |
| | | // fetch part if not available |
| | | if (!isset($part->body)) { |
| | | $part->body = $MESSAGE->get_part_content($part->mime_id); |
| | | } |
| | | |
| | | // extract headers from message/rfc822 parts |
| | | if ($part->mimetype == 'message/rfc822') { |
| | | $msgpart = rcube_mime::parse_message($part->body); |
| | | if (!empty($msgpart->headers)) { |
| | | $part = $msgpart; |
| | | $out .= html::div('message-partheaders', rcmail_message_headers(sizeof($header_attrib) ? $header_attrib : null, $part->headers)); |
| | | } |
| | | } |
| | | |
| | | // message is cached but not exists (#1485443), or other error |