diff options
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r-- | system/libraries/Email.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 6739db33b..7bde4c4fd 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1692,12 +1692,7 @@ class CI_Email { */ protected function _smtp_connect() { - $ssl = NULL; - - if ($this->smtp_crypto == 'ssl') - { - $ssl = 'ssl://'; - } + $ssl = ($this->smtp_crypto == 'ssl') ? 'ssl://' : NULL; $this->_smtp_connect = fsockopen($ssl.$this->smtp_host, $this->smtp_port, @@ -1717,6 +1712,7 @@ class CI_Email { { $this->_send_command('hello'); $this->_send_command('starttls'); + $crypto = stream_socket_enable_crypto($this->_smtp_connect, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT); if ($crypto !== TRUE) @@ -2112,4 +2108,4 @@ class CI_Email { // END CI_Email class /* End of file Email.php */ -/* Location: ./system/libraries/Email.php */ +/* Location: ./system/libraries/Email.php */
\ No newline at end of file |