Set the content type to multipart/alternative when we have either a
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 23 Dec 2008 16:17:35 +0000 (11:17 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 23 Dec 2008 16:17:35 +0000 (11:17 -0500)
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

index 784c0e7..1b21891 100644 (file)
@@ -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);