UNPKG

gbox-notification

Version:

Email temaplates and notifications

91 lines (52 loc) 1.35 kB
<h1 align="center"> <img width="200" src="http://gauss.hr/wp-content/themes/olympos/images/landing/logo.svg" alt="gauss"> GaussBox Errors </h1> Build as support for Gauss Box API. Works with Sails.js only. Send email notification. Only for GaussBox and Sails.js. ## Install ``` $ npm install --save gbox-notification ``` ## Usage Example ```js First set emailConfig object in env file! const notification = require('gbox-notification'); notification.sendNotification('key', emails, data) ``` ## List of keys ```js Email object: [ { email:'test@gauss.hr', language: 'eng' } ] Data object: { parent:{}, child:{}, option, apiData:{} } ************************************************ Send email when user is created and have access: key : 'user_create_send_password' { parent: {userDetailsObject} child: {} option: {password:'password'} apiData: apiData } ************************************************* Reset password notification: key : 'reset_password' { parent: {userDetailsObject} child: {} option:{resetUrl:'/#/auth/reset-password/${token}'}, apiData: apiData } ``` ## Created by [Dejan Kubaša, Gauss d.o.o.](http://gauss.hr/)