X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=MessagePreview.php;h=e12a031292a12e021c3b46a05bfe97032939c8d8;hp=4607ec0a37f468b13cd24635d750faf5b0778ed3;hb=443623f47935eb52acd65a3ff0d84eab1fd5a98b;hpb=c653a33c6265fc1cb27181ceca7ce98568cd19be diff --git a/MessagePreview.php b/MessagePreview.php index 4607ec0a..e12a0312 100644 --- a/MessagePreview.php +++ b/MessagePreview.php @@ -18,8 +18,9 @@ class Pman_Core_MessagePreview extends Pman return true; } - function get() + function get($v, $opts=array()) { + if(empty($_REQUEST['_id']) || empty($_REQUEST['_table'])){ $this->jerr('Missing Options'); } @@ -34,7 +35,7 @@ class Pman_Core_MessagePreview extends Pman } - function post() + function post($v) { if(empty($_REQUEST['_id']) || empty($_REQUEST['_table'])){ $this->jerr('Missing Options'); @@ -59,13 +60,12 @@ class Pman_Core_MessagePreview extends Pman $sent = $cn->sendManual(); - if($sent === true){ - $this->jerr($sent); + if(get_class($sent) != 'Pman_Core_NotifySend_Exception_Success'){ + $this->jerr($sent->getMessage()); } $this->jok("SUCCESS"); - /* $mid = $_REQUEST['_id']; @@ -114,6 +114,8 @@ class Pman_Core_MessagePreview extends Pman $content = $x->{$method}($this, $this->authUser); + $content['bcc'] = array(); + $sent = $core_email->send($content); if(is_object($sent)){