summaryrefslogtreecommitdiffstats
path: root/SendGrid/Example/Program.cs
diff options
context:
space:
mode:
authorElmer Thomas <elmer@thinkingserious.com>2015-11-24 18:46:06 -0800
committerElmer Thomas <elmer@thinkingserious.com>2015-11-24 18:46:06 -0800
commit5b355fb483b2ec107233d7a1cf29aa4e6458a505 (patch)
treea2880604f6bdcd94e82ca46e5cab7e655a79d279 /SendGrid/Example/Program.cs
parentd685ac8edd21a6063d9f1f7236e4e1e3f2d7ab94 (diff)
downloadsendgrid-csharp-5b355fb483b2ec107233d7a1cf29aa4e6458a505.zip
sendgrid-csharp-5b355fb483b2ec107233d7a1cf29aa4e6458a505.tar.gz
sendgrid-csharp-5b355fb483b2ec107233d7a1cf29aa4e6458a505.tar.bz2
Implement pull #127, add api key constructors
Diffstat (limited to 'SendGrid/Example/Program.cs')
-rw-r--r--SendGrid/Example/Program.cs10
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