3

I got an error when using nodemailer on localhost, causing an internal server error (500): ERROR: SELF_SIGNED_CERT_IN_CHAIN

I found this thread on the issue: Npm SELF_SIGNED_CERT_IN_CHAIN on Azure, suggesting to do:

npm config set ca ""

but didn't help. also upgrading the npm didn't help:

npm update -g
4

3 回答 3

15

所以就在我即将降级我的node.js(版本10.32)时,我发现了这个线程:

启动服务器时的 SELF_SIGNED_CERT_IN_CHAIN

暗示它是反病毒软件!!!那是阻止一些需要的证书。

禁用防病毒后,它起作用了!

于 2014-10-02T07:25:32.577 回答
10

Disable antivirus "Outbound email scan" SMTP

wanted a way to leave my anti-virus running, and so just disabled the SMTP scan on Avast and all works. Am sure there is a better way, but this works.

于 2014-11-20T23:50:18.187 回答
7

这是解决此问题的 Node.js 配方:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

参考 - https://github.com/nodemailer/nodemailer/issues/357

于 2015-12-31T04:49:04.763 回答