summaryrefslogtreecommitdiffstats
path: root/examples/mail
diff options
context:
space:
mode:
authorElmer Thomas <elmer@thinkingserious.com>2016-06-01 11:33:11 -0700
committerElmer Thomas <elmer@thinkingserious.com>2016-06-01 11:33:11 -0700
commitcc9e4e317d998a703f8d25e27f57c37be2132b33 (patch)
tree56da84a74280bfe5494bf2a9ec6a0eebb05d1d65 /examples/mail
parent4cde4e7ee0329c179fa8745655a602521f1c2dd8 (diff)
downloadsendgrid-csharp-cc9e4e317d998a703f8d25e27f57c37be2132b33.zip
sendgrid-csharp-cc9e4e317d998a703f8d25e27f57c37be2132b33.tar.gz
sendgrid-csharp-cc9e4e317d998a703f8d25e27f57c37be2132b33.tar.bz2
Updated examples to include pause, removed uncessary dependency and updates usage instructions
Diffstat (limited to 'examples/mail')
-rw-r--r--examples/mail/mail.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/mail/mail.cs b/examples/mail/mail.cs
index 7e329d0..827abc8 100644
--- a/examples/mail/mail.cs
+++ b/examples/mail/mail.cs
@@ -1,7 +1,6 @@
using System;
using SendGrid.Helpers.Mail;
using System.Collections.Generic;
-using System.Net;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
@@ -14,6 +13,7 @@ dynamic response = sg.client.mail.batch.post();
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result);
Console.WriteLine(response.ResponseHeaders.ToString());
+Console.ReadLine();
##################################################
# Validate batch ID #
@@ -24,6 +24,7 @@ dynamic response = sg.client.mail.batch._(batch_id).get();
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result);
Console.WriteLine(response.ResponseHeaders.ToString());
+Console.ReadLine();
##################################################
# v3 Mail Send Beta #
@@ -176,4 +177,5 @@ dynamic response = sg.client.mail.send.beta.post(requestBody: data);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result);
Console.WriteLine(response.ResponseHeaders.ToString());
+Console.ReadLine();