证书链中的nodemailer错误自签名证书

时间:2020-04-15 12:45:03

标签: node.js email nodemailer

我的gmail帐户也获得了不太安全的应用状态

const transporter = nodemailer.createTransport({
      service: 'gmail',
      auth: {
        user: worker_email,
        pass: worker_pass
      }
})

当我尝试

transporter.sendEmail(options)

我遇到了错误:

Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34)
at TLSSocket.emit (events.js:223:5)
at TLSSocket._finishInit (_tls_wrap.js:794:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12) {
  code: 'ESOCKET',
  command: 'CONN'
}

1 个答案:

答案 0 :(得分:0)

请查看以下简短答案:https://stackoverflow.com/a/64913747/5172977

基本上,这可能与您的传输设置有关。