Skip to content

Instantly share code, notes, and snippets.

@ti24horas
Created June 5, 2013 18:58
Show Gist options
  • Save ti24horas/5716265 to your computer and use it in GitHub Desktop.
Save ti24horas/5716265 to your computer and use it in GitHub Desktop.
CardboardFish Sample send message
public string SendSms(SmsMessage msg)
{
var ss = new SendSMS();
ss.setURL(this.hosts.Current);
ss.initialise(this.username, this.password);
// this.sourceAddress=38062493106 is set in the constructor. The number is inject from app config
var result = ss.sendSMS(msg.ToNumber, this.sourceAddress, msg.Message);
if (result < 0)
{
throw new InvalidOperationException(string.Format("Cardboardfish delivered {0} as result for message data: {1}", result, msg.ToString()));
}
return result.ToString(CultureInfo.InvariantCulture);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment