Last active
November 4, 2020 11:26
-
-
Save leoaiassistant/1f1e7bb453bf707b1e618bad5b2c7ba7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function sendEmailHandler (agent) { | |
const {email, name} = agent.parameters; | |
const transporter = nodemailer.createTransport({ | |
host: 'smtp.mail.com ', | |
port: 465, | |
service: 'gmail', | |
auth: { | |
user: 'yourUsername', | |
pass: 'yourPassword' | |
} | |
}); | |
const mailOptions = { | |
from: "userID", // sender address | |
to: email, // list of receivers | |
subject: "Notify2email Demo: Book your AI & Tech Mentoring session 🤖", // Subject line | |
html: '<h1>Welcome to the Notify2email AI based Assistant 🤖</h1> <h2>We are going to have a great conversation</h2> <p> 🤖 About AI & technology on the mentoring session, your spot is confirmed!✅ </p> ', | |
attachments: | |
[{ | |
filename: attachments, | |
path: attachments, | |
cid: attachments //my mistake was putting "cid:logo@cid" here! | |
}] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment