protected function negotiate()
    {
        if (PEAR::isError($error = $this->put('EHLO', $this->localhost))) {
            return $error;
        }

        if (PEAR::isError($this->parseResponse(250))) {
            /* If the EHLO failed, try the simpler HELO command. */
            if (PEAR::isError($error = $this->put('HELO', $this->localhost))) {
                return $error;
            }
            if (PEAR::isError($this->parseResponse(250))) {
                return PEAR::raiseError('HELO was not accepted', $this->code);
            }

            return true;
        }

        foreach ($this->arguments as $argument) {
            $verb      = strtok($argument, ' ');
            $len       = strlen($verb);
            $arguments = substr($argument, $len + 1, strlen($argument) - $len - 1);
            $this->esmtp[$verb] = $arguments;
        }

        if (!isset($this->esmtp['PIPELINING'])) {
            $this->pipelining = false;
        }

        return true;
    }
protected function negotiate()
    {
        if (PEAR::isError($error = $this->put('EHLO', $this->localhost))) {
            return $error;
        }

        if (PEAR::isError($this->parseResponse(250))) {
            /* If the EHLO failed, try the simpler HELO command. */
            if (PEAR::isError($error = $this->put('HELO', $this->localhost))) {
                return $error;
            }
            if (PEAR::isError($this->parseResponse(250))) {
                return PEAR::raiseError('HELO was not accepted', $this->code);
            }

            return true;
        }

        foreach ($this->arguments as $argument) {
            $verb      = strtok($argument, ' ');
            $len       = strlen($verb);
            $arguments = substr($argument, $len + 1, strlen($argument) - $len - 1);
            $this->esmtp[$verb] = $arguments;
        }

        if (!isset($this->esmtp['PIPELINING'])) {
            $this->pipelining = false;
        }

        return true;
    }
protected function negotiate ( ) { if ( PEAR :: isError ( $ error = $ this -> put ( 'EHLO' , $ this -> localhost ) ) ) { return $ error ; } if ( PEAR :: isError ( $ this -> parseResponse ( 250 ) ) ) { /* If the EHLO failed, try the simpler HELO command. */ if ( PEAR :: isError ( $ error = $ this -> put ( 'HELO' , $ this -> localhost ) ) ) { return $ error ; } if ( PEAR :: isError ( $ this -> parseResponse ( 250 ) ) ) { return PEAR :: raiseError ( 'HELO was not accepted' , $ this -> code ) ; } return true ; } foreach ( $ this -> arguments as $ argument ) { $ verb = strtok ( $ argument , ' ' ) ; $ len = strlen ( $ verb ) ; $ arguments = substr ( $ argument , $ len + 1 , strlen ( $ argument ) - $ len - 1 ) ; $ this -> esmtp [ $ verb ] = $ arguments ; } if ( ! isset ( $ this -> esmtp [ 'PIPELINING' ] ) ) { $ this -> pipelining = false ; } return true ; }
Attempt to send the EHLO command and obtain a list of ESMTP
extensions available, and failing that just send HELO.

@return mixed Returns a PEAR_Error with an error message on any
kind of failure, or true on success.

@since 1.1.0
Attempt to send the EHLO command and obtain a list of ESMTP extensions available and failing that just send HELO .