I thought about it during a morning shower, how can I design HTML messages in an MVC3 application?
I was thinking of something like using PartialView and invoking the resulting HTML, saving it as a string, to use it in the HtmlMessage tag.
Instead of doing something like:
string body = @"<html><h1>This is an email. Yuk formatting and hard to maintain.</h1></html>";
I could do something like:
string body = Html.Action("WelcomeEmail", "Emails");
Since MVC3 is so reliable and mature, there must be a standard way to do this, right?
What is the recommended approach?
source share