File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments