From: Michael J. Rubinsky Date: Tue, 23 Dec 2008 16:17:35 +0000 (-0500) Subject: Set the content type to multipart/alternative when we have either a X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d194825e8d27a36c7064583f82ba4a12633521dc;p=horde.git 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. --- 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);