Nodemailer: Error: self Signed Certificate in Certificate chain

Asked

Viewed 199 times

0

I am trying to send an email by nodemailer, but the following error appears:

Error: self Signed Certificate in Certificate chain.

My code:

let transporter = nodemailer.createTransport({
    host: "smtp.gmail.com",
    port: 465,
    secure: true,
    auth: {
        user: "---------",
        pass: "----------"
    }
})
transporter.sendMail({
    from: "-------- <--------->",
    to: "-----------",
    subject: "Teste",
    text: "teste"
})
  • 1

    follow that, will help you solve this problem.

  • You are using a certificate that has not been signed by a certification authority. The risk of using this kind of is anyone else can make such a certificate. An attacker can intercept their data traffic by creating one of these certificates.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.