From a7796bec1be01b51f400e9a3a698535b12b636aa Mon Sep 17 00:00:00 2001 From: Marius Burkard <m.burkard@pixcept.de> Date: Thu, 11 Feb 2016 13:44:27 -0500 Subject: [PATCH] Merge branch 'stable-3.1' --- interface/lib/classes/ispcmail.inc.php | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/lib/classes/ispcmail.inc.php b/interface/lib/classes/ispcmail.inc.php index 308d9df..c92601c 100644 --- a/interface/lib/classes/ispcmail.inc.php +++ b/interface/lib/classes/ispcmail.inc.php @@ -589,9 +589,14 @@ * @access private */ private function _smtp_login() { - $this->_smtp_conn = fsockopen(($this->smtp_crypt == 'ssl' ? 'ssl://' : '') . $this->smtp_host, $this->smtp_port, $errno, $errstr, 30); + $this->_smtp_conn = fsockopen(($this->smtp_crypt == 'ssl' ? 'tls://' : '') . $this->smtp_host, $this->smtp_port, $errno, $errstr, 30); $response = fgets($this->_smtp_conn, 515); if(empty($this->_smtp_conn)) return false; + + //Say Hello to SMTP + if($this->smtp_helo == '') $this->detectHelo(); + fputs($this->_smtp_conn, 'HELO ' . $this->smtp_helo . $this->_crlf); + $response = fgets($this->_smtp_conn, 515); // ENCRYPTED? if($this->smtp_crypt == 'tls') { @@ -599,11 +604,6 @@ fgets($this->_smtp_conn, 515); stream_socket_enable_crypto($this->_smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT); } - - //Say Hello to SMTP - if($this->smtp_helo == '') $this->detectHelo(); - fputs($this->_smtp_conn, 'HELO ' . $this->smtp_helo . $this->_crlf); - $response = fgets($this->_smtp_conn, 515); //AUTH LOGIN fputs($this->_smtp_conn, 'AUTH LOGIN' . $this->_crlf); -- Gitblit v1.9.1