summaryrefslogtreecommitdiffstats
path: root/SendGrid/Example/Example.cs
diff options
context:
space:
mode:
authorElmer Thomas <elmer@ThinkingSerious.com>2016-07-22 14:17:01 -0700
committerMaxim Dubrovkin <maximdubrovkin@Maxims-MBP.Dlink>2016-09-20 20:11:30 +0500
commite4da460f1500f72ce30d3393c33785033940dc6f (patch)
treeef63e095b3edf1af741fd79a901b791b4c21cde1 /SendGrid/Example/Example.cs
parent9f617aff3dd3f066dbc6294558f09be5695a2bbd (diff)
downloadsendgrid-csharp-e4da460f1500f72ce30d3393c33785033940dc6f.zip
sendgrid-csharp-e4da460f1500f72ce30d3393c33785033940dc6f.tar.gz
sendgrid-csharp-e4da460f1500f72ce30d3393c33785033940dc6f.tar.bz2
Adjusting content and commenting out the optional template functionality
Diffstat (limited to 'SendGrid/Example/Example.cs')
-rw-r--r--SendGrid/Example/Example.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/SendGrid/Example/Example.cs b/SendGrid/Example/Example.cs
index b5e8b99..723bee2 100644
--- a/SendGrid/Example/Example.cs
+++ b/SendGrid/Example/Example.cs
@@ -32,11 +32,12 @@ namespace Example
Email email = new Email("test2@example.com");
mail.Personalization[0].AddTo(email);
- //If you want to use a tempalte
- //Adding this will replace the above added subject and content
- mail.TemplateId = "TEMPLATE_ID";
- mail.Personalization[0].AddSubstitution("[KEY_1]", "VALUE_1");
- mail.Personalization[0].AddSubstitution("[KEY_2]", "VALUE_1");
+ // If you want to use a transactional [template](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html),
+ // the following code will replace the above subject and content. The sample code assumes you have defined
+ // substitution variables [KEY_1] and [KEY_2], to be replaced by VALUE_1 and VALUE_2 respectively, in your template.
+ //mail.TemplateId = "TEMPLATE_ID";
+ //mail.Personalization[0].AddSubstitution("[KEY_1]", "VALUE_1");
+ //mail.Personalization[0].AddSubstitution("[KEY_2]", "VALUE_2");
dynamic response = sg.client.mail.send.post(requestBody: mail.Get());
Console.WriteLine(response.StatusCode);