Skip to content

Commit

Permalink
CRM-18408 - Net_SMTP - Use CA_Config for SSL options
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed May 10, 2017
1 parent 61ac02e commit 1f656ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Net/SMTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ function __construct($host = null, $port = null, $localhost = null,
}
$this->pipelining = $pipelining;

if (!isset($socket_options['ssl'])) {
if (!is_array($socket_options)) $socket_options = array();
$caConfig = CA_Config_Stream::singleton();
if ($caConfig->isEnableSSL()) {
$socket_options['ssl'] = $caConfig->toStreamOptions();
}
}

$this->_socket = new Net_Socket();
$this->_socket_options = $socket_options;
$this->_timeout = $timeout;
Expand Down

0 comments on commit 1f656ec

Please sign in to comment.