1.1.1 • Published 6 years ago

@helloxyz/node_notification v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

node_notification

node module for notification, currently only support email notification

Install

$ npm i @helloxyz/node_notification

Usage

var notification = require('./index')

var from = 'fromxxx@163.com'
var to = 'toxxx1@126.com, toxxx2@hotmail.com'
var smtpConfig = {
    host: 'smtp.163.com',
    port: 25,
    secure: false,
    auth: {
        user: from,
        pass: 'xxx'
    }
}
notification.initialize('email', {
    smtpConfig: smtpConfig,
    from: from,
    to: to
})

notification.send({
    subject: 'test email from notification module',
    message: 'hello world!!!'
})

License

MIT