错误:无效登录:535 使用 Mailgun 时身份验证失败

问题描述 投票:0回答:2

尝试使用nodemailer发送邮件时如何修复以下错误?

我试图在互联网上寻找解决方案。但所有答案都不适合我的情况。

类似问题:nodemailer 无效登录:535 身份验证失败

因为我正在使用 mailgun 平台。

sendRawEmail Error: Invalid login: 535 Authentication failed
at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)
at SMTPConnection._actionAUTHComplete (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1542:34)
at SMTPConnection.<anonymous> (/app/node_modules/nodemailer/lib/smtp-connection/index.js:546:26)
at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:953:20)
at SMTPConnection._onData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:755:14)
at TLSSocket.SMTPConnection._onSocketData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:193:44)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at TLSSocket.Readable.push (node:internal/streams/readable:228:10) {
code: 'EAUTH',
response: '535 Authentication failed',
responseCode: 535,
command: 'AUTH PLAIN'

我多次检查了所有信息 SMTP、SMTP_USER、SMTP_PASS、SMTP_PORT。 他们都是正确的。

node.js reactjs nodemailer mailgun
2个回答
0
投票

我找到了重置密码的解决方案。

也许这是邮件枪的错误。 生成新密码后,它开始正常工作。 我希望这可以帮助其他使用 mailgun 的人。


0
投票

Mailgun 需要声明允许访问 SMTP 和 API 的 IP,您可以在 https://app.mailgun.com/settings/ip-access-management?ipAllowlistLimit=50&ipAllowlistSkip=0

添加该 IP

更多信息:在此处输入链接描述

© www.soinside.com 2019 - 2024. All rights reserved.