Kabam plugin to notify users by email. Binds to kabam-kernel event system

npm install kabam-plugin-notify-email
6 downloads in the last week
13 downloads in the last month


Kabam-kernel plugin to notify users by email. Binds to Kabam-kernel event emiting system and user.notify function


  • This plugin depends on view engine being installed (kabam-plugin-hogan)
  • Email Templates are in ./views/emailTemplates directory from the basepath of the application
  • The configuration should set EMAIL_CONFIG, which is best set in environment variable. Currently it only works with gmail, with the format of 'username@gmail.com':'password'


Sample usage of sending an email to a user in the application:

      userFound.notify('email','Hello!'); // send simple message
        'message':{ //can have every structure that can be rendered by template engine
          'memo':'This is very imnportant',
          'numbers' : [1,2,3,5,6],
          'items':{ crowbar:{'size':'XL'}, 'hammer':{'size':'XXL'} }
      }); // send message with custom template

The template for that email should be stored on ./views/emailTemplates/important.html It will provide the user data in user object and the custom data in message object. The template language supported is mustache but we use [[ and ]] tags to avoid conflicts with angular tags.

Sample template:

<!DOCTYPE html>
  <p>Hello [[user.username]]</p>

Current lead developer for this package is T. Budiman Former lead developer: Anatolij Ostroumov

npm loves you