Question about using the Email module

Hello again everybody, I’m in the final stages of my bot development, thanks to everyone who helped me in other ocassions. This time I’m wondering, how may I use the email module? I have everything filled in the module but I know I have to manipulate another file in order for the bot and this module to be able to work, the thing is I don’t know anything about SMTP servers or how to configure one, where should I start and how may I implement it in order to make this module work?. Thanks in advanced.

@Saul_Esparza 1. In CLI go to dir

path_to_\data\global\actions\builtin

  1. npm i nodemailer
  2. create an action with code like

“use strict”;
// Use at least Nodemailer v4.1.0
const nodemailer = require(‘nodemailer’);

let transporter = nodemailer.createTransport({
host: ‘smtp.gmail.com’,
port: 465,
secure: true, // use SSL
auth: {
user: ‘email.address.you.are.sending.with@gmail.com’,
pass: ‘Password’
}

});

// Message object
let message = {
    from: 'Sender <email.address.you.are.sending.with@gmail.com>',
    to: 'where.its.going@thehelpdeskname.freshdesk.com, comma.seperate.different.email.addresses@thehelpdeskname.freshdesk.com, you.can.also.cc.and.bcc@thehelpdeskname.freshdesk.com' , //freshdesk offers free helpdesk for email channel and beats Ethereal there if you want a free option
    subject: 'You can replace everything with variables for sec',
    text: 'Name: '+ '\t' + event.state.user.customerName + '\n'+ 'Message: ' + '\t' + event.state.user.message};
// Sending message   
transporter.sendMail(message);