make sure there is no whitespace leading or trailling the host string, when attempting to send

This commit is contained in:
Klaus Leithoff 2011-07-21 12:11:17 +00:00
parent cae37dab26
commit f297d65790

View File

@ -105,6 +105,7 @@ class egw_mailer extends PHPMailer
$hosts = explode(';',$this->Host); $hosts = explode(';',$this->Host);
foreach ($hosts as $k => &$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) if (in_array($port,array(465,587)) && strpos($host,'://')===false)
{ {
//$host = ($port==587?'tls://':'ssl://').trim($host); //$host = ($port==587?'tls://':'ssl://').trim($host);