Skip to content

Instantly share code, notes, and snippets.

@Codesleuth
Forked from EsendexDev/GetInboxMessages.cs
Last active December 22, 2015 15:39
Show Gist options
  • Save Codesleuth/6493851 to your computer and use it in GitHub Desktop.
Save Codesleuth/6493851 to your computer and use it in GitHub Desktop.
Getting Inbox messages using the Esendex .Net SDK - Full details here: http://developers.esendex.com/
using com.esendex.sdk.inbox;
...
const int pageNumber = 1;
const int pageSize = 20;
var inboxService = new InboxService(USERNAME, PASSWORD);
try
{
var receivedMessages = inboxService.GetMessages(pageNumber, pageSize);
foreach (var item in receivedMessages.Messages)
{
Console.WriteLine("Message Id:{0}\nMessage:{1}\n\n", item.Id, item.Summary);
}
}
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