Skip to content

Instantly share code, notes, and snippets.

@mheadd
Created May 18, 2011 19:31
Show Gist options
  • Select an option

  • Save mheadd/979343 to your computer and use it in GitHub Desktop.

Select an option

Save mheadd/979343 to your computer and use it in GitHub Desktop.
Send multiple SMS messages through SMSified using Node.js
var sys = require('sys');
var smsified = require('smsified');
var config = require('./config');
var messages = new Array('I love Node.js', 'I love Node.js even more', 'I love Node.js the mostest')
for(var i=0; i<messages.length; i++) {
var sms = new SMSified(config.credentials.username, config.credentials.password);
var options = {senderAddress: '4076541234', address: '16867541234', message: messages[i]};
sms.sendMessage(options, function(result) {
sys.puts(sys.inspect(result));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment