gpt4 book ai didi

email - SMTP 错误 : 454 4. 7.0 登录尝试次数过多,请稍后再试

转载 作者:行者123 更新时间:2023-12-01 06:20:23 25 4
gpt4 key购买 nike

我已经使用 gmail 帐户设置了 SMTP 服务器。直到几天前它都运行良好。当我检查日志时,我在其中发现了以下条目:

SMTP Error: 454 4.7.0 Too many login attempts, please try again later.

我已经重新启动了 SMTP 服务两次。我检查了使用 this 设置的配置关联。一切都和我们设置的一样。我也重新启动了 SMTP 服务器和机器。

我已经检查了两步验证设置。它未启用。我检查了“不太安全”的应用程序设置,并按照建议将其设置为“启用” here .

我已按照建议启用了应用程序 here使用以下链接。

https://security.google.com/settings/security/permissions?pli=1

但是没有添加任何应用程序。任何人都可以建议我需要寻找的任何东西吗?提前致谢。

最佳答案

这是因为您正试图为每封电子邮件创建一个新的 smtp 连接。您需要使用 SMTP 池。

请参阅:

DELIVERING BULK MAIL

POOLED SMTP

Pooled smtp is mostly useful when you have a large number of messages that you want to send in batches or your provider allows you to only use a small amount of parallel connections.



如果您使用的是 Node-mailer:
const transporter = nodemailer.createTransport({
host: 'smtp.gmail.com',
port: 465,
secure: true,
pool: true, // This is the field you need to add
auth: {
user: 'test@test.com',
pass: 'your_password'
}});

然后,您需要在发送所有电子邮件后关闭池。
transporter.close();

关于email - SMTP 错误 : 454 4. 7.0 登录尝试次数过多,请稍后再试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40550149/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com