Skip to content

Instantly share code, notes, and snippets.

@infynyxx
Created February 14, 2012 15:35
Show Gist options
  • Save infynyxx/1827598 to your computer and use it in GitHub Desktop.
Save infynyxx/1827598 to your computer and use it in GitHub Desktop.
Making Email API call with C# client
string apiKey = "***************";
string secret = "***************";
SailthruClient client = new SailthruClient(apiKey, secret);
SailthruResponse response;
EmailRequest emailRequest = new EmailRequest();
emailRequest.email = "[email protected]";
Hashtable fieldsVar = new Hashtable();
fieldsVar.Add("name", "prajwal tuladhar");
fieldsVar.Add("state", "NY");
emailRequest.vars = fieldVars;
response = client.SetEmail(emailRequest);
if (response.IsOK())
{
//do something
}
else
{
String errorrResponse = response.RawResponse;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment