Created
February 14, 2012 15:35
-
-
Save infynyxx/1827598 to your computer and use it in GitHub Desktop.
Making Email API call with C# client
This file contains hidden or 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
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