535 Authentication Credentials Invalid in Node.js



我正在使用带有smtp-pool的节点邮件发送邮件,当我运行应用程序时,我得到这个错误。我的用户和主机的一切都是正确的,但我面临这个错误。

email.js

const nodemailer = require("nodemailer");
var smtpPool = require('nodemailer-smtp-pool');

const sendEnquiryEmail = function (enquiryData) {
let FromUserName = 'Chat2cars';
nodemailer.createTestAccount((err, account) => {
var transporter = nodemailer.createTransport(smtpPool({
host: 'smtp.gmail.com',
port: 587,
auth: {
user: 'user@gmail.com',
pass: 'mypass'
},
maxConnections: 5,
maxMessages: 10
}));
module.exports = {
sendEnquiryEmail: sendEnquiryEmail
}

And i face this Error

Error: Invalid login: 535 Authentication Credentials Invalid
at SMTPConnection._formatError (D:CHAT_CARNodenode_modulessmtp-connectionlibsmtp-connection.js:528:15)
at SMTPConnection._actionAUTHComplete (D:CHAT_CARNodenode_modulessmtp-connectionlibsmtp-connection.js:1231:30)
at SMTPConnection.<anonymous> (D:CHAT_CARNodenode_modulessmtp-connectionlibsmtp-connection.js:319:22)
at SMTPConnection._processResponse (D:CHAT_CARNodenode_modulessmtp-connectionlibsmtp-connection.js:669:16)
at SMTPConnection._onData (D:CHAT_CARNodenode_modulessmtp-connectionlibsmtp-connection.js:493:10)
at TLSSocket.emit (events.js:210:5)
at addChunk (_stream_readable.js:308:12)
at readableAddChunk (_stream_readable.js:289:11)
at TLSSocket.Readable.push (_stream_readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:182:23) {
code: 'EAUTH',
response: '535 Authentication Credentials Invalid',
responseCode: 535,
command: 'AUTH PLAIN'
}```

按帮助的可能性排序。

  1. 再次检查您是否有正确的密码😊
  2. 检查用户是否启用了2fa,如果是,你将需要一个应用程序密码
  3. 检查您的Captcha loc
  4. 查看Xoauth2

相关内容

  • 没有找到相关文章

最新更新