Mailer.php
authorAlan Knowles <alan@roojs.com>
Wed, 22 Aug 2012 04:00:18 +0000 (12:00 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 22 Aug 2012 04:00:18 +0000 (12:00 +0800)
Mailer.php

index 35a7a32..2340246 100644 (file)
@@ -85,7 +85,10 @@ class Pman_Core_Mailer {
             $this->htmlbodytoCID($htmlbody);
             
              
-        } 
+        }
+        
+        
+        
         $template = new HTML_Template_Flexy( array(
                 'nonHTML' => true,
         ));
@@ -125,6 +128,29 @@ class Pman_Core_Mailer {
                                      '@' . $content->HTTP_HOST .'>';
         
         
+        
+        
+        if ($htmlbody !== false) {
+            require_once 'Mail/mime.php';
+            $mime = new Mail_mime(array('eol' => "\n"));
+            
+            $mime->setTXTBody($parts[2]);
+            $mime->setHTMLBody($htmlbody);
+            
+            foreach($)
+            
+                $mime->addAttachment($file, 'text/plain');
+
+                $parts[2] = $mime->get();
+                $parts[1]= $mime->headers($parts[1]);
+            
+
+        
+        
+        
+        
+        
+        
        // list($recipents,$headers,$body) = $parts;
         return array(
             'recipents' => $parts[0],