nodemailer error: self-signed certificate in certificate chain


dg2903

I googled but couldn't find an answer to my question. this is my code

var xoauth2 = require('xoauth2');

var transporter = nodemailer.createTransport({
  service: "Gmail",
  auth: {
    xoauth2: xoauth2.createXOAuth2Generator({
      user: "[email protected]", 
      clientId: "-",
      clientSecret: "-",
      refreshToken: "-"
       })
  }
});

app.post('/send', function (req, res) {
  var mailOptions = {
      from: 'dude',
      to: '[email protected]',
      subject: 'Email Example',
      text: 'username: ' + req.body.firstname,
      attachments:[
        {
          filename: req.files.myfile.name,
          content: new Buffer(req.files.myfile.data,'utf-8')
        }
      ]
  };

  transporter.sendMail(mailOptions, function(error, info){
    if(error){
      console.log(error);
      res.send(error);
    } else {
      console.log('Message sent!!');
      res.send('sent');
    }
  });
});

I used to have this problem when I wasn't using oauth2, now that I'm using it, I thought it would go away, but it doesn't. What am I doing wrong here?

dg2903

OK, it's because of antivirus software. I swear things like this make me feel quit smoking.

Related


OpenSSL: Error "Self-signed certificate in certificate chain"

Lunar Mushrooms: When I use the openssl API to verify the server certificate (self-signed), I get the following error: Error 1 Deep Look 19: Self-signed certificate in certificate chain According to the openssl documentation , this error (19) is "X509_V_ERR_SE

OpenSSL: Error "Self-signed certificate in certificate chain"

Lunar Mushrooms: When I use the openssl API to verify the server certificate (self-signed), I get the following error: Error 1 Deep Look 19: Self-signed certificate in certificate chain According to the openssl documentation , this error (19) is "X509_V_ERR_SE

OpenSSL: Error "Self-signed certificate in certificate chain"

Lunar Mushrooms: When I use the openssl API to verify the server certificate (self-signed), I get the following error: Error 1 Deep Look 19: Self-signed certificate in certificate chain According to the openssl documentation , this error (19) is "X509_V_ERR_SE

nodejs - wrong self signed certificate in certificate chain

Doyle: I'm having issues with client side https requests. Fragments can look like this: var fs = require('fs'); var https = require('https'); var options = { hostname: 'someHostName.com', port: 443, path: '/path', method: 'GET', key: fs.re

nodejs - wrong self signed certificate in certificate chain

Doyle: I'm having issues with client side https requests. Fragments can look like this: var fs = require('fs'); var https = require('https'); var options = { hostname: 'someHostName.com', port: 443, path: '/path', method: 'GET', key: fs.re

nodejs - wrong self signed certificate in certificate chain

Doyle: I'm having issues with client side https requests. Fragments can look like this: var fs = require('fs'); var https = require('https'); var options = { hostname: 'someHostName.com', port: 443, path: '/path', method: 'GET', key: fs.re