From d194825e8d27a36c7064583f82ba4a12633521dc Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 23 Dec 2008 11:17:35 -0500 Subject: [PATCH] Set the content type to multipart/alternative when we have either a plain text part or html part. Michael - S. I'm not 100% sure if this is correct, but if the type is not explictly set here, it uses the default of application/octet-stream and the message body is empty when sent. --- framework/Mime/lib/Horde/Mime/Mail.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/Mime/lib/Horde/Mime/Mail.php b/framework/Mime/lib/Horde/Mime/Mail.php index 784c0e7fd..1b21891f7 100644 --- a/framework/Mime/lib/Horde/Mime/Mail.php +++ b/framework/Mime/lib/Horde/Mime/Mail.php @@ -431,10 +431,12 @@ class Horde_Mime_Mail $this->_htmlBody->setDescription(_("HTML Version of Message")); $basepart->addPart($this->_htmlBody); $mime->addPart($basepart); + $mime->setType('multipart/alternative'); } elseif (!empty($this->_htmlBody)) { $mime->addPart($this->_htmlBody); } elseif (!empty($this->_body)) { $mime->addPart($this->_body); + $mime->setType('multipart/alternative'); } foreach ($this->_parts as $mime_part) { $mime->addPart($mime_part); -- 2.11.0