Skip to content

Commit

Permalink
fix(customAuth): Do not require user and pass to be set for custom au…
Browse files Browse the repository at this point in the history
…thentication schemes (fixes #1584)
  • Loading branch information
andris9 committed Oct 22, 2023
1 parent 9da77b6 commit 41d482c
Show file tree
Hide file tree
Showing 4 changed files with 553 additions and 462 deletions.
2 changes: 1 addition & 1 deletion lib/smtp-connection/index.js
Expand Up @@ -434,7 +434,7 @@ class SMTPConnection extends EventEmitter {
}

if (this._authMethod !== 'XOAUTH2' && (!this._auth.credentials || !this._auth.credentials.user || !this._auth.credentials.pass)) {
if (this._auth.user && this._auth.pass) {
if ((this._auth.user && this._auth.pass) || this.customAuth.has(this._authMethod)) {
this._auth.credentials = {
user: this._auth.user,
pass: this._auth.pass,
Expand Down

0 comments on commit 41d482c

Please sign in to comment.