Horde_Smtp::_hello PHP Méthode

_hello() protected méthode

Send "Hello" command to the server.
protected _hello ( )
    protected function _hello()
    {
        $ehlo = $host = $this->_getHostname();
        if ($host === false) {
            $ehlo = $_SERVER['SERVER_ADDR'];
            $host = 'localhost';
        }
        $this->_connection->write($this->_ehlo . ' ' . $ehlo);
        try {
            $resp = $this->_getResponse(250);
            foreach ($resp as $val) {
                $tmp = explode(' ', $val, 2);
                $this->_extensions[$tmp[0]] = empty($tmp[1]) ? true : $tmp[1];
            }
        } catch (Horde_Smtp_Exception $e) {
            switch ($e->getSmtpCode()) {
                case 502:
                    // Old server - doesn't support EHLO
                    $this->_connection->write('HELO ' . $host);
                    try {
                        $this->_getResponse(250);
                    } catch (Horde_Smtp_Exception $e2) {
                        $this->logout();
                        throw $e;
                    }
                    $this->_extensions = array();
                    break;
                default:
                    $this->logout();
                    throw $e;
            }
        }
    }