ali-push

0.1.12 • Public • Published

Aliyun push sdk for node.js, include DirectMail and SMS.

npm version npm download Build Status

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: 'test@shanchain.com',
  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

License

MIT

/ali-push/

    Package Sidebar

    Install

    npm i ali-push

    Weekly Downloads

    9

    Version

    0.1.12

    License

    MIT

    Last publish

    Collaborators

    • joveyzheng