I was thinking about this during my morning shower, how can I construct HTML messages in an MVC3 application?
I was thinking something like using a PartialView
and invoking the resulting HTML, saving the it as a string to use it in the HtmlMessage body.
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 robust and mature, there must be a standard way of doing this, correct?
What is the recommended approach?