0.0.18 • Published 10 years ago

obd-sms-plugin v0.0.18

Weekly downloads
67
License
-
Repository
-
Last release
10 years ago

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
    }
});
0.0.18

10 years ago

0.0.17

10 years ago

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago