Mailer.php
authorChris <chris@roojs.com>
Thu, 14 Nov 2013 11:11:59 +0000 (19:11 +0800)
committerChris <chris@roojs.com>
Thu, 14 Nov 2013 11:11:59 +0000 (19:11 +0800)
Mailer.php

index b32fa51..f52e95e 100644 (file)
@@ -217,10 +217,13 @@ class Pman_Core_Mailer {
             //if got a attachments
             print_r($mime->headers($parts[1]));
             if (isset($parts[1]['Content-Type'])) {
-                
                 unset($parts[1]['Content-Type']);
             }
-            
+            $header = $mime->headers($parts[1]);
+            $mime->setTXTBody($parts[2]);
+            if(preg_match('/text\/html/', $header['Content-Type'])){
+                $mime->setHTMLBody($parts[2]);
+            }
             print_r($mime->headers($parts[1]));
             $mime->setHTMLBody($parts[2]);
             foreach($this->attachments as $attch){