diff options
author | Elmer Thomas <elmer@thinkingserious.com> | 2016-07-23 07:43:00 -0700 |
---|---|---|
committer | Elmer Thomas <elmer@thinkingserious.com> | 2016-07-23 07:43:00 -0700 |
commit | 03807ce2a60d5d1c895ff867565db4dbc8cfb569 (patch) | |
tree | 1c9fc5bb1b22ee4e82b511dee3dc6e60262a4367 | |
parent | 959d13ae2d4fa4f6991a70dfefd2dfd74f8c15ac (diff) | |
parent | 5b37b46623732362f5c9d783b3d0aefd5abed891 (diff) | |
download | sendgrid-csharp-03807ce2a60d5d1c895ff867565db4dbc8cfb569.zip sendgrid-csharp-03807ce2a60d5d1c895ff867565db4dbc8cfb569.tar.gz sendgrid-csharp-03807ce2a60d5d1c895ff867565db4dbc8cfb569.tar.bz2 |
Merge branch 'antimatter96-patch-1'
-rw-r--r-- | SendGrid/Example/Example.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SendGrid/Example/Example.cs b/SendGrid/Example/Example.cs index 5e1fa42..75c3b47 100644 --- a/SendGrid/Example/Example.cs +++ b/SendGrid/Example/Example.cs @@ -33,6 +33,13 @@ namespace Example Email email = new Email("test2@example.com"); mail.Personalization[0].AddTo(email); + // 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 = await sg.client.mail.send.post(requestBody: mail.Get()); Console.WriteLine(response.StatusCode); Console.WriteLine(response.Body.ReadAsStringAsync().Result); |