From b54f328c9e94aae88e1b1ed83b47fd5bf925ccab Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 30 Jun 2009 15:57:49 -0600 Subject: [PATCH] Add explicit encoding type when setting contents of a Horde_Mime_Part --- imp/lib/Compose.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index 57edd4a0b..425a59557 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -571,8 +571,6 @@ class IMP_Compose $headers->addHeader('Bcc', $header['bcc']); } - $fcc = $headers->toString(array('charset' => $charset, 'defserver' => $_SESSION['imp']['maildomain'])); - /* Strip attachments if requested. */ $save_attach = $prefs->getValue('save_attachments'); if (($save_attach == 'never') || @@ -592,8 +590,9 @@ class IMP_Compose } } - /* Add the body text to the message string. */ - $fcc .= $mime_message->toString(false); + /* Generate the message string. */ + $fcc = $headers->toString(array('charset' => $charset, 'defserver' => $_SESSION['imp']['maildomain'])) . + $mime_message->toString(false); $imp_folder = IMP_Folder::singleton(); @@ -2158,14 +2157,15 @@ class IMP_Compose $link_part->setType('text/plain'); $link_part->setCharset($charset); $link_part->setDisposition('inline'); - $link_part->setContents($trailer, $part->getCurrentEncoding()); + $link_part->setContents($trailer, '8bit'); $link_part->setDescription(_("Attachment Information")); $mixed_part->addPart($link_part); return $mixed_part; } - $part->appendContents("\n-----\n" . $trailer, $part->getCurrentEncoding()); + $part->appendContents("\n-----\n" . $trailer, '8bit'); + return $part; } -- 2.11.0