0

I am trying to send a email through my server so anyone will enter his/her email to my app instantly get an welcome email i'm using nodemailer but i'm getting error in my console click the link to see the error and please explain what does this error means? enter image description here

let transporter = nodemialer.createTransport({
    service : 'gmail',
    auth: {
        user: 'gauravrajpoot452@gmail.com',
        pass: 'sonu@12345'
    }
});

app.post('/', (req, res) => {
    let email = req.body.userEmail;

    let mailOptions = {
        from: 'gauravrajpoot452@gmail.com',
        to: email,
        subject: 'Node tutorials',
        text: `Hey gaurav you're a software engineer.`
    } 
    
    transporter.sendMail(mailOptions, (error, info) => {
        if(error){
            console.log(error);
        }
        else{
            console.log('Email sent' + info.response);
        }
    });
});
Liam
  • 27,717
  • 28
  • 128
  • 190
Gaurav
  • 1
  • 1
  • 1
  • 1
  • post error in text here please – The Fool Jan 14 '21 at 15:52
  • Does this answer your question? [Openssl : error "self signed certificate in certificate chain"](https://stackoverflow.com/questions/12180552/openssl-error-self-signed-certificate-in-certificate-chain) – Liam Jan 14 '21 at 15:52
  • It means you have a self signed certificate in the certificate chain ` ¯\_(ツ)_/¯ ` I'm not really clear what other information you need? – Liam Jan 14 '21 at 15:53
  • So does it mean that i have to do some auth with gmail or something and sorry maybe i'm not able to make you understand my code error but how can i solve this error? – Gaurav Jan 14 '21 at 15:56

0 Answers0