jsreactor-channel-sendgrid
v1.0.75
Published
see jsreactor module
Downloads
24
Readme
Install
$ npm install jsreactor-channel-sendgrid @coderofsalvation/jsreactor
then include it as usual:
var BRE = require('jsreactor')
var b = BRE(/* myBackendAdapter */ )
var inputChannel = require('jsreactor/channel/Input)
var sendgridChannel = require('jsreactor-channel-sendgrid')
new inputChannel(b)
new sendgridChannel(b)
b.init() // first init
b.run({email:"[email protected]"}) // data will be passed thru the business rules engine
// and conditionally triggers actions
Environment vars
- SENDGRID_API_KEY=l2k3l2k3 (see sendgrid)
- [email protected] (default from-address)
- SENDGRID_TEMPLATE=lk3l3-lk34 (default template)
Notes
If you want to send attachements just pass {email:"[email protected]",attachments:[]}
(see docs for attachment-format)