summaryrefslogtreecommitdiffstats
path: root/SendGrid/Example/Program.cs
diff options
context:
space:
mode:
authorBrandon West <brawest@gmail.com>2013-07-29 08:55:14 -0600
committerBrandon West <brawest@gmail.com>2013-07-29 08:55:14 -0600
commit726bea9f238f1c3c45e8bdca9577bd9cc526c9d7 (patch)
tree46975699f118c3d5199fe120c7d291a325917a2d /SendGrid/Example/Program.cs
parent607fe1bed6dc9cbb5f6c331d7f621c2e850b4e57 (diff)
parent2a1b360b89ac07fab5e4a377f380bd563dfa5f7e (diff)
downloadsendgrid-csharp-726bea9f238f1c3c45e8bdca9577bd9cc526c9d7.zip
sendgrid-csharp-726bea9f238f1c3c45e8bdca9577bd9cc526c9d7.tar.gz
sendgrid-csharp-726bea9f238f1c3c45e8bdca9577bd9cc526c9d7.tar.bz2
Merge branch 'master' of github.com:sendgrid/sendgrid-csharp
Diffstat (limited to 'SendGrid/Example/Program.cs')
-rwxr-xr-xSendGrid/Example/Program.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs
new file mode 100755
index 0000000..29b02e6
--- /dev/null
+++ b/SendGrid/Example/Program.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Net.Mail;
+using System.Text;
+using SendGridMail;
+using SendGridMail.Transport;
+
+namespace Example
+{
+ class Program
+ {
+ // this code is used for the SMTPAPI examples
+ static void Main(string[] args)
+ {
+ var username = "sgrid_username";
+ var password = "sgrid_password";
+ var from = "bar@domain.com";
+ var to = new List<String>
+ {
+ "foo@domain.com",
+ "raz@domain.com"
+ };
+
+ //initialize the SMTPAPI example class
+ var smtpapi = new SMTPAPI(username, password, from, to);
+ var restapi = new WEBAPI(username, password, from, to);
+
+ //use this section to test out our Web and SMTP examples!
+ smtpapi.SimpleHTMLEmail();
+ restapi.SimpleHTMLEmail();
+
+ Console.WriteLine("Done!");
+ Console.ReadLine();
+ }
+
+ }
+}