DataObjects/Core_project.php
[Pman.Core] / MessagePreview.php
index df5ca57..310bde5 100644 (file)
@@ -84,11 +84,19 @@ class Pman_Core_MessagePreview extends Pman
         $x = new $cls;
         
         $method = "test_{$core_email->name}";
-        $this->jerr("{$method} does not exists in {$cls}");
+        
         if(!method_exists($x, $method)){
             $this->jerr("{$method} does not exists in {$cls}");
         }
+
+        $content = $x->{$method}($this, $this->authUser);
         
+        $sent = $core_email->send($content);
+        
+        if(is_object($sent)){
+            $this->jerr("Error sending email - " . $sent->toString());
+        }
         
+        $this->jok('SUCCESS');
     }
 }