-
-
Save Codesleuth/6493876 to your computer and use it in GitHub Desktop.
Creating and Sending SMS messages using the Esendex .Net SDK - Full details here: http://developers.esendex.com/
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
using com.esendex.sdk; | |
using com.esendex.sdk.messaging; | |
... | |
var credentials = new EsendexCredentials(USERNAME, PASSWORD); | |
var messagingService = new MessagingService(true, credentials); | |
try | |
{ | |
var message = new SmsMessage("447123456789", "This is a test message...", "<myAccountReference>"); | |
var result = messagingService.SendMessage(message); | |
Console.WriteLine("Sent Message Batch Id: {0}", result.BatchId); | |
foreach (var messageId in result.MessageIds) | |
{ | |
Console.WriteLine("Message Uri: {0}", messageId.Uri); | |
} | |
} | |
catch (WebException ex) | |
{ | |
Console.Write(ex.Message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment