Created
June 5, 2013 18:58
-
-
Save ti24horas/5716265 to your computer and use it in GitHub Desktop.
CardboardFish Sample send message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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