DataObjects/core.sql
[Pman.Core] / Mailer.php
index a306f24..ff25d5e 100644 (file)
@@ -168,18 +168,18 @@ class Pman_Core_Mailer {
             'head_charset' => 'utf-8',
         ));
         // clean up the headers...
-        $parts[1] = $mime->headers($parts[1]);
+        
         
         $parts[1]['Message-Id'] = '<' .   $content->msgid   .
                                      '@' . $content->HTTP_HOST .'>';
         
-        
-        
-        
+          
         if ($htmlbody !== false) {
             // got a html headers...
             
-            
+            if (isset($parts[1]['Content-Type'])) {
+                unset($parts[1]['Content-Type']);
+            }
             $mime->setTXTBody($parts[2]);
             $mime->setHTMLBody($htmlbody);
 //            var_dump($mime);exit;
@@ -194,7 +194,7 @@ class Pman_Core_Mailer {
                 );
             }
             $parts[2] = $mime->get();
-            
+            $parts[1] = $mime->headers($parts[1]);
         
         }