summaryrefslogtreecommitdiffstats
path: root/SendGrid
diff options
context:
space:
mode:
authorBrandon West <brawest@gmail.com>2014-05-29 19:50:48 -0600
committerBrandon West <brawest@gmail.com>2014-05-29 19:51:19 -0600
commitb6c7d1c6e3a907c56e4e783cda4e619d33a1766a (patch)
tree0dd1f9e30df4c8bae68e08e6d838d9edd77b96a5 /SendGrid
parentd74d46045231d0fbc59d118b2788d2cb043192e1 (diff)
downloadsendgrid-csharp-b6c7d1c6e3a907c56e4e783cda4e619d33a1766a.zip
sendgrid-csharp-b6c7d1c6e3a907c56e4e783cda4e619d33a1766a.tar.gz
sendgrid-csharp-b6c7d1c6e3a907c56e4e783cda4e619d33a1766a.tar.bz2
add EnableTemplateEngine method
Diffstat (limited to 'SendGrid')
-rw-r--r--SendGrid/SendGridMail/ISendGrid.cs6
-rw-r--r--SendGrid/SendGridMail/Properties/AssemblyInfo.cs4
-rw-r--r--SendGrid/SendGridMail/SendGrid.cs9
3 files changed, 17 insertions, 2 deletions
diff --git a/SendGrid/SendGridMail/ISendGrid.cs b/SendGrid/SendGridMail/ISendGrid.cs
index 7855ba1..6c9d3fa 100644
--- a/SendGrid/SendGridMail/ISendGrid.cs
+++ b/SendGrid/SendGridMail/ISendGrid.cs
@@ -240,6 +240,12 @@ namespace SendGrid
/// <param name="html">HTML that your emails will be wrapped in, containing a body replacementTag.</param>
void EnableTemplate(String html = null);
+ /// <summary>
+ /// Enable a Template Engine template via the template ID
+ /// </summary>
+ /// <param name="template_id">The ID of the Template Engine template to use.</param>
+ void EnableTemplateEngine(String templateId);
+
/// <summary>
/// Automatically sends a blind carbon copy to an address for every e-mail sent, without
/// adding that address to the header.
diff --git a/SendGrid/SendGridMail/Properties/AssemblyInfo.cs b/SendGrid/SendGridMail/Properties/AssemblyInfo.cs
index 85aaaa2..23cba28 100644
--- a/SendGrid/SendGridMail/Properties/AssemblyInfo.cs
+++ b/SendGrid/SendGridMail/Properties/AssemblyInfo.cs
@@ -42,5 +42,5 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.0.1")]
-[assembly: AssemblyFileVersion("3.0.1")] \ No newline at end of file
+[assembly: AssemblyVersion("3.0.2")]
+[assembly: AssemblyFileVersion("3.0.2")] \ No newline at end of file
diff --git a/SendGrid/SendGridMail/SendGrid.cs b/SendGrid/SendGridMail/SendGrid.cs
index fe6a99b..667f94d 100644
--- a/SendGrid/SendGridMail/SendGrid.cs
+++ b/SendGrid/SendGridMail/SendGrid.cs
@@ -65,6 +65,7 @@ namespace SendGrid
{"Footer", "footer"},
{"GoogleAnalytics", "ganalytics"},
{"Template", "template"},
+ {"Templates","templates"},
{"Bcc", "bcc"},
{"BypassListManagement", "bypass_list_management"}
};
@@ -362,6 +363,14 @@ namespace SendGrid
Header.AddFilterSetting(filter, new List<string> {"text/html"}, html);
}
+ public void EnableTemplateEngine(string templateId)
+ {
+ var filter = Filters["Templates"];
+
+ Header.EnableFilter(filter);
+ Header.AddFilterSetting(filter, new List<string> { "template_id" }, templateId);
+ }
+
public void EnableBcc(string email)
{
var filter = Filters["Bcc"];