Skip to content

Commit b154710

Browse files
Merge pull request #187 from ccasbre27/master
How to use template email
2 parents 7c6716e + 0df37f9 commit b154710

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ using (var attachmentFileStream = new FileStream(@"C:\file.txt", FileMode.Open))
109109
}
110110
```
111111

112-
#How to: Use filters to enable footers, tracking, and analytics
112+
#How to: Use filters to enable footers, tracking, analytics and templates
113113

114114
SendGrid provides additional email functionality through the use of filters. These are settings that can be added to an email message to enable specific functionality such as click tracking, Google analytics, subscription tracking, and so on. For a full list of filters, see [Filter Settings](https://sendgrid.com/docs/API_Reference/SMTP_API/apps.html).
115115

@@ -145,6 +145,19 @@ myMessage.Text = "Hello World!";
145145
myMessage.EnableClickTracking(true);
146146
```
147147

148+
##Template
149+
```csharp
150+
// Create the email object first, then add the properties.
151+
SendGridMessage myMessage = new SendGridMessage();
152+
myMessage.AddTo("[email protected]");
153+
myMessage.From = new MailAddress("[email protected]", "John Smith");
154+
myMessage.Subject = "Testing the SendGrid Library";
155+
myMessage.Text = "Hello World!";
156+
157+
// Enable template engine, you must send the template id
158+
myMessage.EnableTemplateEngine("template id");
159+
```
160+
148161
#How to: Use the [Web API v3](https://sendgrid.com/docs/API_Reference/Web_API_v3/index.html)
149162

150163
Note: We have just begun to implement support for these endpoints and therefore only the following endpoints are currently supported. This functionality is located in the "SendGrid" project.

0 commit comments

Comments
 (0)