Skip to content

Commit

Permalink
fix(smtp-verify): Fied accessToken usage for verifying SMTP account s…
Browse files Browse the repository at this point in the history
…ettings
  • Loading branch information
andris9 committed Nov 22, 2023
1 parent 6a87e53 commit 0cd38f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,10 @@ MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV3QUiYsp13nD9suD1/ZkEXnuMoSg
smtpConfig.tls.rejectUnauthorized = false;
}

if (smtpConfig.auth && smtpConfig.auth.accessToken) {
smtpConfig.auth.type = 'OAuth2';
}

const smtpClient = nodemailer.createTransport(smtpConfig);
smtpClient.set('proxy_socks_module', socks);
response.smtp = {
Expand Down

0 comments on commit 0cd38f2

Please sign in to comment.