Skip to content

Commit 713b3c4

Browse files
Adjusting content and commenting out the optional template functionality
1 parent a56b187 commit 713b3c4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

SendGrid/Example/Example.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ private static void HelloEmail()
3232
Email email = new Email("[email protected]");
3333
mail.Personalization[0].AddTo(email);
3434

35-
//If you want to use a tempalte
36-
//Adding this will replace the above added subject and content
37-
mail.TemplateId = "TEMPLATE_ID";
38-
mail.Personalization[0].AddSubstitution("[KEY_1]", "VALUE_1");
39-
mail.Personalization[0].AddSubstitution("[KEY_2]", "VALUE_1");
35+
// If you want to use a transactional [template](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html),
36+
// the following code will replace the above subject and content. The sample code assumes you have defined
37+
// substitution variables [KEY_1] and [KEY_2], to be replaced by VALUE_1 and VALUE_2 respectively, in your template.
38+
//mail.TemplateId = "TEMPLATE_ID";
39+
//mail.Personalization[0].AddSubstitution("[KEY_1]", "VALUE_1");
40+
//mail.Personalization[0].AddSubstitution("[KEY_2]", "VALUE_2");
4041

4142
dynamic response = sg.client.mail.send.post(requestBody: mail.Get());
4243
Console.WriteLine(response.StatusCode);

0 commit comments

Comments
 (0)