From b0fe8d229ea93f33b25e6aa9f810458e1a73b15a Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 3 Jun 2008 09:30:44 +0000 Subject: [PATCH] -patch by Jon Crawford to enable ssl connections for smtp (phpgwapi/inc/class.phpmailer.inc.php ) example: hostname: ssl://smtp.servername.country port: 465 --- phpgwapi/inc/class.phpmailer.inc.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.phpmailer.inc.php b/phpgwapi/inc/class.phpmailer.inc.php index 25e28a9eb0..e51671e7f9 100644 --- a/phpgwapi/inc/class.phpmailer.inc.php +++ b/phpgwapi/inc/class.phpmailer.inc.php @@ -566,8 +566,16 @@ class PHPMailer // Retry while there is no connection while($index < count($hosts) && $connection == false) { - if(strpos($hosts[$index], ":") !== false) - list($host, $port) = explode(":", $hosts[$index]); + if(strpos($hosts[$index], ":") !== false) + { + $hostA = explode(":", $hosts[$index]); + if (is_numeric(end($hostA))) { + $port = array_pop($hostA); + } else { + $port = $this->Port; + $host = implode(':', $hostA); + } + } else { $host = $hosts[$index];