Merge master (2.1.0) and fixed conflicts.
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 6739db3..7bde4c4 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1692,12 +1692,7 @@
*/
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 @@
{
$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 @@
// 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