protected function getBestAuthMethod()
    {
        $available_methods = explode(' ', $this->esmtp['AUTH']);

        foreach ($this->auth_methods as $method => $callback) {
            if (in_array($method, $available_methods)) {
                return $method;
            }
        }

        return PEAR::raiseError('No supported authentication methods');
    }
protected function getBestAuthMethod()
    {
        $available_methods = explode(' ', $this->esmtp['AUTH']);

        foreach ($this->auth_methods as $method => $callback) {
            if (in_array($method, $available_methods)) {
                return $method;
            }
        }

        return PEAR::raiseError('No supported authentication methods');
    }
protected function getBestAuthMethod ( ) { $ available_methods = explode ( ' ' , $ this -> esmtp [ 'AUTH' ] ) ; foreach ( $ this -> auth_methods as $ method => $ callback ) { if ( in_array ( $ method , $ available_methods ) ) { return $ method ; } } return PEAR :: raiseError ( 'No supported authentication methods' ) ; }
Returns the name of the best authentication method that the server
has advertised.

@return mixed Returns a string containing the name of the best
supported authentication method or a PEAR_Error object
if a failure condition is encountered.
@since 1.1.0
Returns the name of the best authentication method that the server has advertised .