diff --git a/inc/inc.ClassEmailNotify.php b/inc/inc.ClassEmailNotify.php index 9c06c047f..833db086b 100644 --- a/inc/inc.ClassEmailNotify.php +++ b/inc/inc.ClassEmailNotify.php @@ -54,6 +54,8 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { protected $debug; + public $errmsg; + function __construct($dms, $translator, $from_address='', $smtp_server='', $smtp_port='', $smtp_username='', $smtp_password='', $lazy_ssl=true, $force_from=false) { /* {{{ */ $this->_dms = $dms; $this->_translator = $translator; @@ -65,6 +67,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { $this->lazy_ssl = $lazy_ssl; $this->force_from = $force_from; $this->debug = false; + $this->errmsg = ''; } /* }}} */ public function setDebug($debug=true) { /* {{{ */ @@ -251,6 +254,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { } $result = $mail->send($to, $hdrs, $message); if (PEAR::isError($result)) { + $this->errmsg = $result->getMessage(); if($this->debug) echo "\n".$result->getMessage(); return false;