Last active
March 7, 2021 21:29
-
-
Save geeksilva97/05c1996456b30f4a18348e2476009628 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const nodemailer = require('nodemailer'); | |
const transporter = nodemailer.createTransport({ | |
service: 'gmail', | |
auth: { | |
user: '[email protected]', | |
pass: 'yourpassword', | |
}, | |
}); | |
transporter.sendMail({ | |
from: '"Your Name" <[email protected]>', // sender address | |
to: "[email protected], [email protected]", // list of receivers | |
subject: "Medium @edigleyssonsilva ✔", // Subject line | |
text: "There is a new article. It's about sending emails, check it out!", // plain text body | |
html: "<b>There is a new article. It's about sending emails, check it out!</b>", // html body | |
}).then(info => { | |
console.log({info}); | |
}).catch(console.error); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment