Mailer.php
[Pman.Core] / Mailer.php
index ef82bed..8536b4a 100644 (file)
@@ -110,6 +110,8 @@ class Pman_Core_Mailer {
     
     function toData()
     {
+        $ts = microtime(true);
+        
         $templateFile = $this->template;
         $args = (array)$this->contents;
         $content  = clone($this->page);
@@ -156,6 +158,7 @@ class Pman_Core_Mailer {
         $htmlbody = false;
         $html_tmp_opts = $tmp_opts;
         $htmltemplate = new HTML_Template_Flexy( $html_tmp_opts );
+        
         if (is_string($htmltemplate->resolvePath('mail/'.$templateFile.'.body.html')) ) { 
             // then we have a multi-part email...
             if (!empty($this->html_locale)) {
@@ -190,7 +193,9 @@ class Pman_Core_Mailer {
         }
         $tmp_opts['nonHTML'] = true;
         
+        $diff = microtime(true) - $ts;
         
+        print_r($diff);exit;
         //print_R($tmp_opts);
         // $tmp_opts['force'] = true;
         
@@ -321,14 +326,8 @@ class Pman_Core_Mailer {
         
         $pg = $ff->page;
         
-        $ts = microtime(true);
-        
         $email = is_array($email)  ? $email : $this->toData();
         
-        $diff = microtime(true) - $ts;
-        
-        print_r($diff);exit;
-        
         if (is_a($email, 'PEAR_Error')) {
             $pg->addEvent("COREMAILER-FAIL",  false, "email toData failed");