0.2.3 • Published 10 years ago

we-send-email v0.2.3

Weekly downloads
2
License
ISC
Repository
github
Last release
10 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

10 years ago

0.2.1

10 years ago

0.0.8

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago

0.0.0

11 years ago