gbox-notification
v2.0.5
Published
Email temaplates and notifications
Downloads
9
Readme
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
First set emailConfig object in env file!
const notification = require('gbox-notification');
notification.sendNotification('key', emails, data)
List of keys
Email object:
[
{
email:'[email protected]',
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
}