From 80c3da850d89ba85ad231eaa5b2de1ec1679f51b Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 9 Dec 2008 14:02:13 +0000 Subject: [PATCH] enable debug for send class to be passed to phpmailer/smtp --- phpgwapi/inc/class.send.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.send.inc.php b/phpgwapi/inc/class.send.inc.php index 92407a18ef..3858fec1ff 100644 --- a/phpgwapi/inc/class.send.inc.php +++ b/phpgwapi/inc/class.send.inc.php @@ -31,7 +31,8 @@ { var $err = array(); var $to_res = array(); - var $debug = false; + // switching on debug with a numeric value other than 0, switches debug in PHPMailer/SMTP Class on + var $debug = false; // false; /** * eGW specific initialisation of the PHPMailer: charset, language, smtp-host, ... * @@ -45,6 +46,7 @@ if ($this->debug) error_log(__METHOD__." ".print_r($this->Subject,true)." to be send"); return PHPMailer::Send(); } + if ($this->debug && is_numeric($this->debug)) $this->SMTPDebug = $this->debug; $this->CharSet = $GLOBALS['egw']->translation->charset(); list($lang,$nation) = explode('-',$GLOBALS['egw_info']['user']['preferences']['common']['lang']); $lang_path = EGW_SERVER_ROOT.'/phpgwapi/setup/';