From 632ef17c63c78f7b35df20929e429bfe4e690f87 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 17 Jan 2026 08:49:19 +0100 Subject: [PATCH] save error msg when send mail failed --- inc/inc.ClassEmailNotify.php | 4 ++++ 1 file changed, 4 insertions(+) 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;