obd-sms-plugin

0.0.18 • Public • Published

obd-sms-plugin

obd-sms-plugin is a pomelo plugin for pomelo4obd. It provides sms send and revice service for pomelo4obd.

Usage

the sms config use json format. For example:

var smsService = require('obd-sms-plugin');
app.use(smsService, {
    "server": {
        "port" : "6789",
        "path" : "/sms",
        "ip" : "*.*.*.*" // to filter illegal ip , '*' make filter none.
    },
    "sender" : {
        "format" : "0",
        "sendSmsUrl" : "http://WWW",
        "corpinfo" : "0"
      },
      "crypto" : {
        "alg" : "des-ede3-cbc", // or other crypto alg
      }
});
//Send sms. In obd, we use to send at command.
//You must give a secret string, and the length of secret should be 24.
var smsService = app.get('smsService');
smsService.send({phones: ["131****, 132****"], message : plaintext, secret: "0123456789abcd0123456789"}, function(err, res) {
    if(err) {
        //error
    } else {
        //do something about res
    }
});

Readme

Keywords

none

Package Sidebar

Install

npm i obd-sms-plugin

Weekly Downloads

0

Version

0.0.18

License

none

Last publish

Collaborators

  • sunfuze