0.2.3 • Published 9 years ago

we-send-email v0.2.3

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

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

module.exports = require('we-send-email').hook;

Usage

var options = {};
// to email
options.email = 'contato@albertosouza.net';
// sender email
options.from = 'Sender@host.net';

// see https://github.com/niftylettuce/node-email-templates
vat templateName = 'myEmailTemplate';

// some variables to send to you template
var templateVariables = {
  user: {
    name: 'Hihiohir'
  },
  site: {
    name: 'WE',
    slogan: 'MIMI one slogan variable here'
  }
};

sails.email.sendEmail(options ,templateName ,templateVariables, cb);

Configuration

the config file is project/config/email.js

See:

Credits

Alberto Souza

LICENSE: MIT

0.2.3

9 years ago

0.2.1

9 years ago

0.0.8

9 years ago

0.0.6

9 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago