DataObjects/ProjectDirectory.php
[Pman.Core] / DataObjects / Person.php
index 5f2984f..ec47f6d 100644 (file)
@@ -41,6 +41,16 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
     ###END_AUTOCODE
     /**
      *
+     * Build an email to sent do user
+     *
+     * key 'args'
+     *
+     * no_auth => disable authentication check on
+     * templateDir => alternative template directory.
+     * HTTP_HOST
+     *
+     * expects mail/TMPLATE.txt (if .html exists, it will be the html body version)
+     * 
      * @param {String} $templateFile  (mail/XXXXXXX.txt) exclude the mail and .txt bit.
      * @param {Array|Object} $args   data to send out..
      * @return {Array|PEAR_Error} array of $recipents, $header, $body 
@@ -139,22 +149,19 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
         }
         $headers['Date'] = date('r');
         
-        
         if ($htmlbody !== false) {
+            require_once 'Mail/mime.php';
             $mime = new Mail_mime(array('eol' => "\n"));
-            $mime->setHeaders($headers);
             $mime->setTXTBody($body);
             $mime->setHTMLBody($htmlbody);
             // I think there might be code in mediaoutreach toEmail somewhere
             // h embeds images here..
             $body = $mime->get();
-            $hdrs = $mime->headers($hdrs);
+            $headers = $mime->headers($headers);
             
         }
         
-        
-        
-        
+         
         
         return array(
             'recipients' => $recipents,