Email Templates using Razor Engine
Razor Engine allows you to use Razor syntax to build robust email templates. We need to know your opinion about that! Make any sense modify the email templates to Razor Syntax? Leave us a message how important is this feature in you ZB software.
More about Razor Engine:
https://www.nuget.org/packages/RazorEngine/
Example:
Razor.SetTemplateBase(typeof(HtmlTemplateBase<>)); string template = @"<html> <head> <title>Hello @Model.Name</title> </head> <body> Email: @Html.TextBoxFor(m => m.Email) </body> </html>"; var model = new PageModel { Name = "World", Email = "someone@somewhere.com" }; string result = Razor.Parse(template, model);
Leave a Reply
Want to join the discussion?Feel free to contribute!