我正在尝试在Express js应用程序中配置节点邮件程序。在发送邮件的过程中,我收到错误消息ENOTFOUND。
我的smpt配置是
smtpServer: {
host: "smtp.gmail.com",
port: 587,
secure: false,
user: "email@gmail.com",
pass: "password",
fromName: "",
fromAddress: ""
}
错误:
{"errno":"ENOTFOUND","code":"ECONNECTION","syscall":"getaddrinfo","hostname":"smtp.gmail.com","host":"smtp.gmail.com","port":587,"command":"CONN","meta":{"errno":"ENOTFOUND","code":"ECONNECTION","syscall":"getaddrinfo","hostname":"smtp.gmail.com","host":"smtp.gmail.com","port":587,"command":"CONN"}}
我怀疑此错误是由于代理问题引起的。因此,我在计算机nslookup表中检查了smpt主机名。
返回以下结果:
$ nslookup smtp.gmail.com
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
*** Can't find smtp.gmail.com: No answer
除了我在这里想念的以外?