protected function _auth()
    {
        if ($this->_helo == false) {
            throw new SMTPException(__('Must call EHLO (or HELO) before calling AUTH'));
        } elseif ($this->_auth !== false) {
            throw new SMTPException(__('Can not call AUTH again.'));
        }

        $this->_send('AUTH LOGIN');
        $this->_expect(334);
        $this->_send(base64_encode($this->_user));
        $this->_expect(334);
        $this->_send(base64_encode($this->_pass));
        $this->_expect(235);
        $this->_auth = true;
    }
protected function _auth()
    {
        if ($this->_helo == false) {
            throw new SMTPException(__('Must call EHLO (or HELO) before calling AUTH'));
        } elseif ($this->_auth !== false) {
            throw new SMTPException(__('Can not call AUTH again.'));
        }

        $this->_send('AUTH LOGIN');
        $this->_expect(334);
        $this->_send(base64_encode($this->_user));
        $this->_expect(334);
        $this->_send(base64_encode($this->_pass));
        $this->_expect(235);
        $this->_auth = true;
    }
protected function _auth ( ) { if ( $ this -> _helo == false ) { throw new SMTPException ( __ ( 'Must call EHLO (or HELO) before calling AUTH' ) ) ; } elseif ( $ this -> _auth !== false ) { throw new SMTPException ( __ ( 'Can not call AUTH again.' ) ) ; } $ this -> _send ( 'AUTH LOGIN' ) ; $ this -> _expect ( 334 ) ; $ this -> _send ( base64_encode ( $ this -> _user ) ) ; $ this -> _expect ( 334 ) ; $ this -> _send ( base64_encode ( $ this -> _pass ) ) ; $ this -> _expect ( 235 ) ; $ this -> _auth = true ; }
Authenticates to the server.
Currently supports the AUTH LOGIN command.
May be extended if more methods are needed.

@throws SMTPException
@return void
Authenticates to the server . Currently supports the AUTH LOGIN command . May be extended if more methods are needed .