im trying to send an email with nodemailer but i get this error
> Error: self signed certificate > at TLSSocket.onConnectSecure (_tls_wrap.js:1515:34) > at TLSSocket.emit (events.js:400:28) > at TLSSocket._finishInit (_tls_wrap.js:937:8) > at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:709:12) { code: 'ESOCKET', command: 'CONN' }
This is my code
async function sendEmail({ from, to, subject, html }) {
try {
const transporter = nodemailer.createTransport({
host: mailer.host,
port: mailer.port,
secure: false,
tls: {
ciphers: 'SSLv3',
rejectUnauthorized: mailer.tls
},
});
const info = await transporter.sendMail({ from, to, subject, html });
console.log(info);
} catch (error) {
console.log(error);
}
}
someone can help me please