Mailer.php
authorAlan Knowles <alan@roojs.com>
Thu, 25 Jul 2013 07:34:47 +0000 (15:34 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 25 Jul 2013 07:34:47 +0000 (15:34 +0800)
Mailer.php

index 0f9abb3..996b552 100644 (file)
@@ -159,8 +159,14 @@ class Pman_Core_Mailer {
             //exit;
         } 
         
-        
-        
+        require_once 'Mail/mime.php';
+        $mime = new Mail_mime(array('eol' => "\n",
+//                                    'html_encoding' => 'base64',
+                                    'html_charset' => 'utf-8',
+                                    'text_charset' => 'utf-8',
+                                    'head_charset' => 'utf-8'
+        // clean up the headers...
+        $parts[1] = $mime->headers($parts[1]);
         
         $parts[1]['Message-Id'] = '<' .   $content->msgid   .
                                      '@' . $content->HTTP_HOST .'>';
@@ -169,13 +175,8 @@ class Pman_Core_Mailer {
         
         
         if ($htmlbody !== false) {
-            require_once 'Mail/mime.php';
-            $mime = new Mail_mime(array('eol' => "\n",
-//                                    'html_encoding' => 'base64',
-                                    'html_charset' => 'utf-8',
-                                    'text_charset' => 'utf-8',
-                                    'head_charset' => 'utf-8'
-                ));
+            // got a html headers...
+            
             
             $mime->setTXTBody($parts[2]);
             $mime->setHTMLBody($htmlbody);