Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const nodemailer = require('nodemailer');
- const transporter = nodemailer.createTransport({
- service: 'gmail',
- auth: {
- user: 'example@gmail.com',
- pass: 'olo-lo'
- }
- });
- app.post('/form-data', (req, res) => {
- var mailOptions = {
- from: 'example@gmail.com',
- to: 'example@gmail.com',
- subject: 'OLOLO',
- html: ``
- };
- });
- transporter.sendMail(mailOptions, function(error, info){
- if (error) {
- console.log(error);
- } else {
- console.log('Email sent: ' + info.response);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement