diff options
author | CJ Buchmann <cj.buchmann@sendgrid.com> | 2012-01-12 16:08:13 -0800 |
---|---|---|
committer | CJ Buchmann <cj.buchmann@sendgrid.com> | 2012-01-12 16:08:13 -0800 |
commit | 48068853163d337f34cd1f971361d6caf97bd7a7 (patch) | |
tree | 4743befca3f7cc2cf6ed4f9f5395fd9c9c8f3c94 /SendGrid/Example/Program.cs | |
parent | d80dbc622a49ce07b7d2a8a43e275d59550202c3 (diff) | |
download | sendgrid-csharp-48068853163d337f34cd1f971361d6caf97bd7a7.zip sendgrid-csharp-48068853163d337f34cd1f971361d6caf97bd7a7.tar.gz sendgrid-csharp-48068853163d337f34cd1f971361d6caf97bd7a7.tar.bz2 |
Added support for Rest API, to get mailing working. Also added examples to send a simple web api.
Diffstat (limited to 'SendGrid/Example/Program.cs')
-rwxr-xr-x | SendGrid/Example/Program.cs | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs index 3bbc1db..4d16952 100755 --- a/SendGrid/Example/Program.cs +++ b/SendGrid/Example/Program.cs @@ -18,11 +18,23 @@ namespace Example var from = "cj.buchmann@sendgrid.com";
var to = new List<String>
{
- "cj.buchmann@gmail.com"
+ "cj.buchmann@sendgrid.com",
+ "tyler.bischel@sendgrid.com"
};
+ var bcc = new List<string>
+ {
+ "eric@sendgrid.com"
+ };
+
+ var cc = new List<string>
+ {
+ "eric@sendgrid.com"
+ };
+
//initialize the SMTPAPI example class
var smtpapi = new SMTPAPI(username, password, from, to);
+ var restpapi = new RESTAPI(username, password, from, to, null, cc);
//send a simple HTML encoded email.
//smtpapi.SimpleHTMLEmail();
@@ -31,7 +43,12 @@ namespace Example //smtpapi.SimplePlaintextEmail();
//send a gravatar enabled email.
- smtpapi.EnableGravatarEmail();
+ //smtpapi.EnableGravatarEmail();
+
+ //send an open tracking enabled email.
+ //smtpapi.EnableOpenTrackingEmail();
+
+ restpapi.SimpleHTMLEmail();
}
}
}
|