Nodemailer停止发送EHLO/HELO邮件



上周nodemailer停止了我在windows 10 pc上作为计划任务运行的一些脚本的工作。在更新nodejs和nodemailer,关闭防火墙,并在另一台pc上尝试后,我仍然无法获得nodemailer发送电子邮件。我已经联系了我的电子邮件提供商,他们向我保证没有任何改变??我可以用Mozilla Thunderbird收发电子邮件。使用nodemailer调试,我得到了以下日志。

我读它的方式是我的电子邮件提供商不再接受127.0.0.1作为ip地址从nodemailer。这是正确的,是否有办法改变ip地址?还是有其他工作?


[2022-06-20 00:23:25] DEBUG Creating transport: nodemailer (6.7.5; +https://nodemailer.com/; SMTP/6.7.5[client:6.7.5])
[2022-06-20 00:23:25] DEBUG Sending mail using SMTP/6.7.5[client:6.7.5]
[2022-06-20 00:23:26] DEBUG [VIUENUHea4] Resolved mailx.freeparking.co.nz as 43.245.52.240 [cache miss]
[2022-06-20 00:23:26] INFO  [VIUENUHea4] Secure connection established to 43.245.52.240:465
[2022-06-20 00:23:29] DEBUG [VIUENUHea4] S: 220 mailx.hosts.net.nz - ESMTP - jessie - Mon, 20 Jun 2022 12:23:29 +1200
[2022-06-20 00:23:29] DEBUG [VIUENUHea4] C: EHLO [127.0.0.1]
[2022-06-20 00:23:29] DEBUG [VIUENUHea4] S: 550-#h1 - An IP of 127.0.0.1 as a HELO is not currently accepted due to high
[2022-06-20 00:23:29] DEBUG [VIUENUHea4] S: 550 volumes of bot activity
[2022-06-20 00:23:29] DEBUG [VIUENUHea4] C: HELO [127.0.0.1]
[2022-06-20 00:23:29] INFO  [VIUENUHea4] Connection closed
[2022-06-20 00:23:29] ERROR [VIUENUHea4] Connection closed unexpectedly
[2022-06-20 00:23:29] DEBUG [VIUENUHea4] Closing connection to the server using "end"
[2022-06-20 00:23:29] ERROR Send Error: Connection closed unexpectedly

我在nodemailer文件中搜索127.0.0.1,并在
"node_modulesnodemailerlibsmtp-connectionindex.js"文件。我更改了
defaultHostname = '[127.0.0.1]';to
defaultHostname = '[135.0.0.1]';(随机ip),它现在工作。
可能有更好的解决方案,如果有,请及时更新。

我也遇到过同样的问题,但是我用这种方法解决了

我更改了"安全";secureConnection"它运行得非常好

:[1]: https://i.stack.imgur.com/qpQt9.png
错误提示:https://i.stack.imgur.com/M1oHB.png

后:[2]: https://i.stack.imgur.com/WZSea.png

PS:我正在从名为"mail"的配置对象中加载所有选项

我希望这对你有帮助。由于

最新更新