NodeJS/Nodemailer 可以在本地使用nodemailer吗?问题 - 从未收到问候语

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

当我尝试在本地网络中使用nodemailer发送邮件时出现错误:

*Greeting never received
    at SMTPConnection._formatError (C:\Users\PI_TEAM\Desktop\node_modules\nodemailer\lib\smtp-connection\index.js:784:19)
    at SMTPConnection._onError (C:\Users\PI_TEAM\Desktop\node_modules\nodemailer\lib\smtp-connection\index.js:770:20)
    at Timeout.<anonymous> (C:\Users\PI_TEAM\Desktop\node_modules\nodemailer\lib\smtp-connection\index.js:704:22)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7) {
  code: 'ETIMEDOUT',
  command: 'CONN'ork connection, the*

如果我连接到 wifi(全球网络),则相同的代码可以工作。 SMTP 服务器是本地的。例如,我可以在本地使用命令提示符发送邮件,但使用 nodemailer - 不。 Nodemailer 需要全球网络才能工作吗?如何在本地使用?

javascript node.js smtp local nodemailer
2个回答
0
投票

很可能是安全证书的情况。 当您向全球发送邮件时,它会获取 SSL 证书并发送邮件。 也尝试使用 ngrok 。如果它也发送邮件,那么就是 SSL 证书问题,即

http
https


0
投票
Error: "Error occurred. Greeting never received"

当我连接到 IT 公司提供的 VPN/安全 WiFi 网络时,就发生了这种情况,当我更改数据网络时,它已为我解决。

问候

加维特·金达尔

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