summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Castro Brenes <ccasbre27@users.noreply.github.com>2016-02-09 10:49:33 -0600
committerCarlos Castro Brenes <ccasbre27@users.noreply.github.com>2016-02-09 10:49:33 -0600
commit0df37f92a1196e2a7c8ae68addf78c27bfb58c8e (patch)
tree9171af255f59fe2d2a96b5a88c9b6102a76fb198
parentb27983a8f3d84a9d28972f2720cca0315ad9fe32 (diff)
downloadsendgrid-csharp-0df37f92a1196e2a7c8ae68addf78c27bfb58c8e.zip
sendgrid-csharp-0df37f92a1196e2a7c8ae68addf78c27bfb58c8e.tar.gz
sendgrid-csharp-0df37f92a1196e2a7c8ae68addf78c27bfb58c8e.tar.bz2
How to use template email
Added code for show how to use template in the email
-rw-r--r--README.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/README.md b/README.md
index 0bb4bb7..2bb57fd 100644
--- a/README.md
+++ b/README.md
@@ -109,7 +109,7 @@ using (var attachmentFileStream = new FileStream(@"C:\file.txt", FileMode.Open))
}
```
-#How to: Use filters to enable footers, tracking, and analytics
+#How to: Use filters to enable footers, tracking, analytics and templates
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).
@@ -145,6 +145,19 @@ myMessage.Text = "Hello World!";
myMessage.EnableClickTracking(true);
```
+##Template
+```csharp
+// Create the email object first, then add the properties.
+SendGridMessage myMessage = new SendGridMessage();
+myMessage.AddTo("anna@example.com");
+myMessage.From = new MailAddress("john@example.com", "John Smith");
+myMessage.Subject = "Testing the SendGrid Library";
+myMessage.Text = "Hello World!";
+
+// Enable template engine, you must send the template id
+ myMessage.EnableTemplateEngine("template id");
+```
+
#How to: Use the [Web API v3](https://sendgrid.com/docs/API_Reference/Web_API_v3/index.html)
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.