gbox-notification
Version:
Email temaplates and notifications
91 lines (52 loc) • 1.35 kB
Markdown
<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.
```
$ npm install --save gbox-notification
```
```js
First set emailConfig object in env file!
const notification = require('gbox-notification');
notification.sendNotification('key', emails, data)
```
```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
}
```
[](http://gauss.hr/)