Advertisement
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: 'mymail',
- pass: 'mypass'
- }
- });
- var mailOptions = {
- from: 'mymaill',
- to: 'mymail', //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);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement