DataObjects/core.sql
[Pman.Core] / Mailer.php
index 980f02d..ef21217 100644 (file)
@@ -92,7 +92,7 @@ class Pman_Core_Mailer {
         require_once 'HTML/Template/Flexy.php';
         
         $tmp_opts = array();
-        if (isset($this->templateDir)) {
+        if (!empty($this->templateDir)) {
             $tmp_opts['templateDir'] = $this->templateDir;
         }
         
@@ -113,23 +113,16 @@ class Pman_Core_Mailer {
             
               
         }
-        
         $tmp_opts['nonHTML'] = true;
-        
+        // $tmp_opts['force'] = true;
         $template = new HTML_Template_Flexy(  $tmp_opts );
         
         $template->compile('mail/'. $templateFile.'.txt');
         
         /* use variables from this object to ouput data. */
         $mailtext = $template->bufferedOutputObject($content);
-        
-        
-        
-        
-        
-        
-        
-        
+        //print_r($mailtext);exit;
+       
         
         
         //echo "<PRE>";print_R($mailtext);
@@ -177,8 +170,6 @@ class Pman_Core_Mailer {
         
         }
         
-        
-        
        // list($recipents,$headers,$body) = $parts;
         return array(
             'recipents' => $parts[0],
@@ -195,6 +186,7 @@ class Pman_Core_Mailer {
         }
         ///$recipents = array($this->email);
         $mailOptions = PEAR::getStaticProperty('Mail','options');
+        //print_R($mailOptions);exit;
         $mail = Mail::factory("SMTP",$mailOptions);
         $headers['Date'] = date('r'); 
         if (PEAR::isError($mail)) {