It is not possible to send mail without authentication in Node Mailer.
But you can send mail using sendmail.In sendmail library does not need
any
smtp/auth to send email.
const sendmail = require('sendmail')();
sendmail({
from: 'test@finra.org',
to: 'YOUR@gmail.com',
subject: 'Hello World',
html: 'Mail of test sendmail '
}, function (err, reply) {
console.log(err && err.stack)
console.dir(reply)
})
Because, Node does not support SMTP natively afaik, so without using a
library like node-mailer etc. you cannot send without using third party.
But you can send mail using sendmail.In sendmail library does not need
any
smtp/auth to send email.
const sendmail = require('sendmail')();
sendmail({
from: 'test@finra.org',
to: 'YOUR@gmail.com',
subject: 'Hello World',
html: 'Mail of test sendmail '
}, function (err, reply) {
console.log(err && err.stack)
console.dir(reply)
})