diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-05 10:33:29 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-05 10:33:29 +0000 |
| commit | 4b57b72cc69bc47c96c0eb05c22d36a92e1522f2 (patch) | |
| tree | 1af15c04933105aa0bd16d3e37d097c3b13fbb97 | |
| parent | 236fb6fd927f85604bec0c4771b3553cb6581e7e (diff) | |
Fix fallback if no message strucutre is provided by the imap server
git-svn-id: https://svn.roundcube.net/trunk@1476 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.php | 5 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index 6ce683aa0..5e56eedb3 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -1248,7 +1248,10 @@ class rcube_imap */ function &get_body($uid, $part=1) { - return $this->get_message_part($uid, $part); + $headers = $this->get_headers($uid); + return rcube_charset_convert( + $this->mime_decode($this->get_message_part($uid, $part), 'quoted-printable'), + $headers->charset ? $headers->charset : $this->default_charset); } diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index ac4eb6b01..ddaf29063 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -728,7 +728,7 @@ function rcmail_message_body($attrib) } } else - $out .= $MESSAGE->body; + $out .= html::div('message-part', html::div('pre', $MESSAGE->body)); $ctype_primary = strtolower($MESSAGE->structure->ctype_primary); |
