summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-06-05 10:33:29 +0000
committerthomascube <thomas@roundcube.net>2008-06-05 10:33:29 +0000
commit0a99895ead5fec3e48719761a142a1c0a25d244c (patch)
tree34fb2cd26cb8da57d447f46d6ec593cda6da4026
parent70aa900cba768a99347d41a9af57edb52ec77577 (diff)
Fix fallback if no message strucutre is provided by the imap server
-rw-r--r--program/include/rcube_imap.php5
-rw-r--r--program/steps/mail/func.inc2
2 files changed, 5 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 6ce683aa0..5e56eedb3 100644
--- a/program/include/rcube_imap.php
+++ b/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/program/steps/mail/func.inc b/program/steps/mail/func.inc
index ac4eb6b01..ddaf29063 100644
--- a/program/steps/mail/func.inc
+++ b/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);