From 859e1206e47999656a37deabe411c017196b3fe1 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 21 Oct 2008 11:57:52 +0000 Subject: [PATCH] preparation to use senderinformation specified with the smtpusername if set (appended to the username in the orm of: smtpusername;mailadress@thatisownedbysmtpusername.com) --- phpgwapi/inc/class.send.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.send.inc.php b/phpgwapi/inc/class.send.inc.php index 93f2472417..b06679ae0c 100644 --- a/phpgwapi/inc/class.send.inc.php +++ b/phpgwapi/inc/class.send.inc.php @@ -64,7 +64,9 @@ $this->Port = $ogServer->port; if($ogServer->smtpAuth) { $this->SMTPAuth = true; - $this->Username = $ogServer->username; + list($username,$senderadress) = explode(';', $ogServer->username,2); + if (isset($senderadress) && !empty($senderadress)) $this->Sender = $senderadress; + $this->Username = $username; $this->Password = $ogServer->password; } } @@ -73,7 +75,9 @@ $this->Host = $GLOBALS['egw_info']['server']['smtp_server']?$GLOBALS['egw_info']['server']['smtp_server']:'localhost'; $this->Port = $GLOBALS['egw_info']['server']['smtp_port']?$GLOBALS['egw_info']['server']['smtp_port']:25; $this->SMTPAuth = !empty($GLOBALS['egw_info']['server']['smtp_auth_user']); - $this->Username = $GLOBALS['egw_info']['server']['smtp_auth_user']; + list($username,$senderadress) = explode(';', $GLOBALS['egw_info']['server']['smtp_auth_user'],2); + if (isset($senderadress) && !empty($senderadress)) $this->Sender = $senderadress; + $this->Username = $username; $this->Password = $GLOBALS['egw_info']['server']['smtp_auth_passwd']; } $this->Hostname = $GLOBALS['egw_info']['server']['hostname'];