-patch by Jon Crawford to enable ssl connections for smtp

(phpgwapi/inc/class.phpmailer.inc.php )
 example: hostname: ssl://smtp.servername.country
	  port: 465
This commit is contained in:
Klaus Leithoff 2008-06-03 09:30:44 +00:00
parent 20fe4703ab
commit b0fe8d229e

View File

@ -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];