diff options
author | Elmer Thomas <elmer@ThinkingSerious.com> | 2015-11-24 19:23:38 -0800 |
---|---|---|
committer | Elmer Thomas <elmer@ThinkingSerious.com> | 2015-11-24 19:23:38 -0800 |
commit | 6d5b3a4c261f25fa308e5a1e87ff1242804db0b1 (patch) | |
tree | af1711eb12796fe63541186d217e36b5a2bbbc89 /SendGrid/Example/Program.cs | |
parent | d685ac8edd21a6063d9f1f7236e4e1e3f2d7ab94 (diff) | |
parent | 1c1806d39aa573e87bca6c8bba2aa65f1a223898 (diff) | |
download | sendgrid-csharp-6d5b3a4c261f25fa308e5a1e87ff1242804db0b1.zip sendgrid-csharp-6d5b3a4c261f25fa308e5a1e87ff1242804db0b1.tar.gz sendgrid-csharp-6d5b3a4c261f25fa308e5a1e87ff1242804db0b1.tar.bz2 |
Merge pull request #164 from sendgrid/apikeys-2v6.3.0
Implement pull #127, add api key constructors
Diffstat (limited to 'SendGrid/Example/Program.cs')
-rw-r--r-- | SendGrid/Example/Program.cs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs index 4cdc71a..62e8060 100644 --- a/SendGrid/Example/Program.cs +++ b/SendGrid/Example/Program.cs @@ -22,15 +22,9 @@ namespace Example private static void SendAsync(SendGrid.SendGridMessage message)
{
- // Create credentials, specifying your user Name and password.
- var username = Environment.GetEnvironmentVariable("SENDGRID_USERNAME");
- var password = Environment.GetEnvironmentVariable("SENDGRID_PASSWORD");
- //string apikey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY");
- var credentials = new NetworkCredential(username, password);
-
+ string apikey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY");
// Create a Web transport for sending email.
- var transportWeb = new SendGrid.Web(credentials);
- //var transportWeb2 = new SendGrid.Web(apikey);
+ var transportWeb = new SendGrid.Web(apikey);
// Send the email.
try
|