diff --git a/lib/imap.js b/lib/imap.js index b8ebe20..be6f87e 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -1443,8 +1443,7 @@ ImapConnection.prototype._login = function(cb) { } else if (this._serverSupports('AUTH=XOAUTH2') && this._options.xoauth2) { this._send('AUTHENTICATE XOAUTH2 ' + utils.escape(this._options.xoauth2), fnReturn); - } else if (this._options.username !== undefined - && this._options.password !== undefined) { + } else if (this._options.username && this._options.password) { this._send('LOGIN "' + utils.escape(this._options.username) + '" "' + utils.escape(this._options.password) + '"', fnReturn); } else {