diff options
author | CJ Buchmann <cj.buchmann@sendgrid.com> | 2012-01-11 16:46:26 -0800 |
---|---|---|
committer | CJ Buchmann <cj.buchmann@sendgrid.com> | 2012-01-11 16:46:26 -0800 |
commit | a0d5ea910ca3ff41fc911af47ce77f31cb59938c (patch) | |
tree | 2a9262109a6d50de0b875a3423b2a265aa90d870 /SendGrid/Example | |
parent | b4db907a4c69a483b00aba9ef0b624c9e5d58c86 (diff) | |
parent | d77d9340304ad40940b1e77e12f484df351fc47a (diff) | |
download | sendgrid-csharp-a0d5ea910ca3ff41fc911af47ce77f31cb59938c.zip sendgrid-csharp-a0d5ea910ca3ff41fc911af47ce77f31cb59938c.tar.gz sendgrid-csharp-a0d5ea910ca3ff41fc911af47ce77f31cb59938c.tar.bz2 |
Merge branch 'us1882' of github.com:sendgrid/sendgrid-csharp into us1882
Conflicts:
SendGrid/Example/Program.cs
Diffstat (limited to 'SendGrid/Example')
-rwxr-xr-x | SendGrid/Example/Program.cs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs index 5e5909c..b14474c 100755 --- a/SendGrid/Example/Program.cs +++ b/SendGrid/Example/Program.cs @@ -14,19 +14,15 @@ namespace Example static void Main(string[] args)
{
var header = new Header();
- var sendgrid = new SendGrid(header);
-
- Console.WriteLine("testing");
-
- var text = "My Text <%%>";
- var html = "<body><p>hello,</p></body>";
- var replace = "John";
- var url = "http://www.example.com";
- var landing = "this_landing";
- sendgrid.EnableUnsubscribe(text, html, replace, url, landing);
-
- Console.WriteLine(header.AsJson());
+ var transport = SMTP.GenerateInstance(new NetworkCredential("sgrid_username", "sgrid_password"));
+ var message = new SendGrid(header);
+ message.AddTo("eric.becking@sendgrid.com");
+ message.From = new MailAddress("eric@sendgrid.com");
+ message.Text = "This is a test message.";
+ message.Html = "<html><p>This is a <b>test</b> message.</p></html>";
+ message.Subject = "hazaah!";
+ transport.Deliver(message);
}
}
}
|