ali-push
v0.1.12
Published
Aliyun push sdk for node.js, include DirectMail and SMS.
Downloads
21
Maintainers
Readme
Aliyun push sdk for node.js, include DirectMail and SMS.
Install
$ npm install ali-push -S
Usage
var push = require('ali-push');
var client = new push({
AccessKeyId: '<Your AccessKeyId>',
AccessKeySecret: '<Your AccessKeySecret>',
AccountName: '<Your AccountName>' // for DirectMail
});
client.SingleSendMail({
ToAddress: '[email protected]',
Subject: 'test',
TextBody: 'hello world'
}, function(err, res, body) {
// do something here
// console.log(err, res, body)
});
/**
* @param {Object} args params
* @param {Function} cb callback
*/
client.MEHOTD(args, callback);
Params
- SingleSendMail
| name | type | required | description | | :---: | :---: | :---: | :---: | | ToAddress | String | yes | | | Subject | String | yes | | | TextBody | String | yes | | | HtmlBody | String | yes | | | FromAlias | String | no | |
Note: choose TextBody
or HtmlBody
- BatchSendMail
| name | type | required | description | | :---: | :---: | :---: | :---: | | TemplateName | String | yes | | | ReceiversName | String | yes | | | TagName | String | no | |
- SingleSendSms
| name | type | required | description | | :---: | :---: | :---: | :---: | | SignName | String | yes | | | TemplateCode | String | yes | | | RecNum | String | yes | | | ParamString | String | yes | |