protected function _tls()
    {
        if ($this->_secure == 'tls') {
            $this->_send('STARTTLS');
            $this->_expect(220, 180);
            if (!stream_socket_enable_crypto($this->_connection, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
                throw new SMTPException(__('Unable to connect via TLS'));
            }
            $this->_ehlo();
        }
    }
protected function _tls()
    {
        if ($this->_secure == 'tls') {
            $this->_send('STARTTLS');
            $this->_expect(220, 180);
            if (!stream_socket_enable_crypto($this->_connection, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
                throw new SMTPException(__('Unable to connect via TLS'));
            }
            $this->_ehlo();
        }
    }
protected function _tls ( ) { if ( $ this -> _secure == 'tls' ) { $ this -> _send ( 'STARTTLS' ) ; $ this -> _expect ( 220 , 180 ) ; if ( ! stream_socket_enable_crypto ( $ this -> _connection , true , STREAM_CRYPTO_METHOD_TLS_CLIENT ) ) { throw new SMTPException ( __ ( 'Unable to connect via TLS' ) ) ; } $ this -> _ehlo ( ) ; } }
Encrypts the current session with TLS.

@throws SMTPException
@return void
Encrypts the current session with TLS .