Send Email Skill

#1

I saw an email skill when I was going through the trivia tutorial. Any idea where I can get that module.

skillsMenu

#2

@DigiSenseiZim, I believe this wasn’t ever released and was a custom module in someone’s installation.

#3

Thining of creating this using nodemailer. Any thoughts? Just want to make sure that this would be the best for the job…

1 Like
#4

Nodemailer could fit quite well. :slight_smile:

2 Likes
#5

Will you consider making it public? Please :slight_smile:

1 Like
#6

I don’t think our agreements allow that.
@sylvain, correct me if I’m wrong.

#7

using nodemailer or making it public?

#8

Making module public.

#9

@jerji42

Okay I never went through the agreement to find out what the fine print says about creating modules and making them public so I won’t share a workaround involving creating a module.

  1. In CLI go to dir

path_to_\data\global\actions\builtin

  1. npm i nodemailer
  2. create an action with code like
//CHECKSUM:ff190
"use strict";
// Use at least Nodemailer v4.1.0
const nodemailer = require('nodemailer');

/**
 * Send an email to John Doe when some foo happens
 * 
 *
 * @title Send Email
 * @category Foo Forwarding
 * @author Michael Mukwekezeke.
 */


    // Create a SMTP transporter object NB: You can create directTransport object to send from server
     
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);

Capiche

#10

Outstanding!! Your my hero :wink:

Ian

#11

No sweat. But be very careful on the security side.