How to send an email to an address from user input feild in React.js/Express.js?


I am making a basic email app where a user can send an email to whomever they like. I want to be able to send an email to user-specified email address. I can’t use nodemailer because it requires password and and I dont want to ask for a password from the user.

I have been searching Google for two days now and all the I can find is how to send an email to yourself and not to user-generated input.

It would be great if anyone could point me in the right direction.



Nodemailer has a sendmail transport that allows you to send mail without any authentication.

let transporter = nodemailer.createTransport({
sendmail: true,
newline: 'unix',
    path: '/usr/sbin/sendmail'
    from: '[email protected]',
    to: '[email protected]',
    subject: 'Message',
    text: 'I hope this message gets delivered!'
}, (err, info) => {

Answered By – Ayomide

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published