diff --git a/lib/tools.js b/lib/tools.js index 47b8d4699..eb934a7b2 100644 --- a/lib/tools.js +++ b/lib/tools.js @@ -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 = {