diff --git a/phpgwapi/inc/class.egw_mailer.inc.php b/phpgwapi/inc/class.egw_mailer.inc.php index 6385c6cc0f..24513d013f 100644 --- a/phpgwapi/inc/class.egw_mailer.inc.php +++ b/phpgwapi/inc/class.egw_mailer.inc.php @@ -105,6 +105,7 @@ class egw_mailer extends PHPMailer $hosts = explode(';',$this->Host); foreach ($hosts as $k => &$host) { + $host = trim($host); // make sure there is no whitespace leading or trailling the host string if (in_array($port,array(465,587)) && strpos($host,'://')===false) { //$host = ($port==587?'tls://':'ssl://').trim($host);