Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.intent('sendMail', (conv, params) => {
- const nodemailer = require('nodemailer');
- const transporter = nodemailer.createTransport({
- service: 'gmail',
- auth: {
- user: 'youremail@gmail.com',
- pass: 'yourPassword'
- }
- });
- var mailOptions = {
- from: 'youremail@gmail.com',
- to: email, //receiver email
- subject: 'Mail subject',
- text: 'mail body'
- };
- transporter.sendMail(mailOptions, function (error, info) {
- if (error) {
- console.log(error);
- } else {
- console.log('Email sent: ' + info.response);
- }
- });
- });
Add Comment
Please, Sign In to add comment