| | |
| | | return $styles; |
| | | } |
| | | |
| | | |
| | | function rcmail_has_html_part($message_parts) |
| | | { |
| | | if (!is_array($message_parts)) |
| | | return FALSE; |
| | | |
| | | // check all message parts |
| | | foreach ($message_parts as $pid => $part) |
| | | { |
| | | $mimetype = strtolower($part->ctype_primary.'/'.$part->ctype_secondary); |
| | | if ($mimetype=='text/html') |
| | | { |
| | | return TRUE; |
| | | } |
| | | } |
| | | |
| | | return FALSE; |
| | | } |
| | | |
| | | // return first HTML part of a message |
| | | function rcmail_first_html_part($message_struct) |
| | | { |
| | | global $IMAP; |
| | | |
| | | if (!is_array($message_struct['parts'])) |
| | | return FALSE; |
| | | |
| | | $html_part = NULL; |
| | | |
| | | // check all message parts |
| | | foreach ($message_struct['parts'] as $pid => $part) |
| | | { |
| | | $mimetype = strtolower($part->ctype_primary.'/'.$part->ctype_secondary); |
| | | if ($mimetype=='text/html') |
| | | { |
| | | $html_part = $IMAP->get_message_part($message_struct['UID'], $pid, $part); |
| | | } |
| | | } |
| | | |
| | | if ($html_part) |
| | | { |
| | | // remove special chars encoding |
| | | //$trans = array_flip(get_html_translation_table(HTML_ENTITIES)); |
| | | //$html_part = strtr($html_part, $trans); |
| | | |
| | | return $html_part; |
| | | } |
| | | |
| | | return FALSE; |
| | | } |
| | | |
| | | |
| | | // return first text part of a message |