|
|
@ -960,9 +960,8 @@ ImapConnection.prototype._login = function(cb) {
|
|
|
|
|
|
|
|
|
|
|
|
if (this.capabilities.indexOf('AUTH=XOAUTH') !== -1 && 'xoauth' in this._options)
|
|
|
|
if (this.capabilities.indexOf('AUTH=XOAUTH') !== -1 && 'xoauth' in this._options)
|
|
|
|
this._send('AUTHENTICATE XOAUTH ' + escape(this._options.xoauth), fnReturn);
|
|
|
|
this._send('AUTHENTICATE XOAUTH ' + escape(this._options.xoauth), fnReturn);
|
|
|
|
else if (this.capabilities.indexOf('AUTH=PLAIN') !== -1 ||
|
|
|
|
else if (this._options.username !== undefined &&
|
|
|
|
// Kludge due to GMail no longer advertising plaintext auth ...
|
|
|
|
this._options.password !== undefined) {
|
|
|
|
this.capabilities.indexOf('X-GM-EXT-1') !== -1) {
|
|
|
|
|
|
|
|
this._send('LOGIN "' + escape(this._options.username) + '" "'
|
|
|
|
this._send('LOGIN "' + escape(this._options.username) + '" "'
|
|
|
|
+ escape(this._options.password) + '"', fnReturn);
|
|
|
|
+ escape(this._options.password) + '"', fnReturn);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|