Bug #8308: Correctly format canonical message parts
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 28 May 2009 12:56:36 +0000 (06:56 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 28 May 2009 12:59:59 +0000 (06:59 -0600)
imp/lib/Contents.php

index 4ecb581..d52c795 100644 (file)
@@ -201,8 +201,8 @@ class IMP_Contents
         try {
             $res = $GLOBALS['imp_imap']->ob->fetch($this->_mailbox, $query, array('ids' => array($this->_index)));
             return empty($options['mimeheaders'])
-                ? $res[$this->_index]['bodypart'][$id]
-                : $res[$this->_index]['mimeheader'][$id] . $res[$this->_index]['bodypart'][$id];
+                ? $res[$this->_index]['bodypart'][$id] . "\r\n"
+                : $res[$this->_index]['mimeheader'][$id] . "\r\n\r\n" . $res[$this->_index]['bodypart'][$id] . "\r\n";
         } catch (Horde_Imap_Client_Exception $e) {
             return '';
         }