node.js - Node 邮件程序 DEPTH_ZERO_SELF_SIGNED_CERT

标签 node.js nodemailer

我正在使用此 SMTP 设置:

secure: true,
ignoreTLS : true,
port: 465,

但是我收到此错误,并且无法发送电子邮件:

[Error: DEPTH_ZERO_SELF_SIGNED_CERT]

如何忽略它?

最佳答案

让它工作,只需将其添加到option.tls中:

{rejectUnauthorized: false} 

关于node.js - Node 邮件程序 DEPTH_ZERO_SELF_SIGNED_CERT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28259239/

相关文章:

javascript - 避免 Node 中的回调 hell

javascript - 始终传递 http 身份验证 header javascript

mysql - Github 项目 Nodejs Web Api

javascript - 与 Nodemailer 的联系表

javascript - 带有异步 forEach 循环的磁带 "test exited without ending"错误

node.js - 从 Firebase 迁移到 NodeJS MongoDB

javascript - 成功 ? 'sent' : 'failed' defaults to 'sent' for success = null. 为什么?

node.js - NodeMailer 电子邮件样式

node.js - 535 5.7.139 认证失败,请求不满足认证成功的条件

firebase - 设置环境变量以 "-bash: !": event not found"结尾