we-send-email
Npm package and Sails hook to send emails with sails.js used on We.js
With node nodemailer
and email-templates
How to install
npm install we-send-email --save
And add it in one sails.js hook:
file: api/hooks/email/index.js
moduleexports = hook;
Usage
var options = {};// to emailoptionsemail = 'contato@albertosouza.net';// sender emailoptionsfrom = 'Sender@host.net'; // see https://github.com/niftylettuce/node-email-templatesvat templateName = 'myEmailTemplate'; // some variables to send to you templatevar templateVariables = user: name: 'Hihiohir' site: name: 'WE' slogan: 'MIMI one slogan variable here' ; sailsemail;
Configuration
the config file is [project]/config/email.js
See:
Credits
LICENSE: MIT