Skip to content

Instantly share code, notes, and snippets.

@gayanhewa
Created April 5, 2014 17:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gayanhewa/32886d4e14b500a02e82 to your computer and use it in GitHub Desktop.
Save gayanhewa/32886d4e14b500a02e82 to your computer and use it in GitHub Desktop.
SMSGateway.me
BroadcastSMS = function(message, phonenumber) {
// Depends on smsgateway.me API v2. Sends sms via Android Device. Not a typical SMS gateway.
var URL = 'http://v2.smsgateway.me/API/Send/Single.php?Username='+Config.sms_gateway_username+'&Password='+Config.sms_gateway_password+'&Message='+message+'&Number='+phonenumber;
console.log(URL);
try{
res = Meteor.http.get(URL);
if (res && res.Success == true) {
//console.log('Success')
//console.log(res);
return true;
}
}catch(e){
console.log('Error occured while sending sms.');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment