node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

a simple Hook for sending emails config.json settings

  "mailer": {
    "host": "localhost",
    "username": "",
    "password": "1234",
    "domain": "localhost"
} Events Names

sendEmail sends email

emailSent event emitted when email is successful sent:

error event emitted when email cannot send:

// emailOptions is a 1:1 mapping to API  
var emailOptions = {
  to      : '',
  from    : '',
  subject : 'This is an email from mailer',
  body    : 'I would like a grilled cheese please.'
myhook.emit('sendEmail', emailOptions);