How to create HTML messages in MVC3 application to send?

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?

+4
source share
2 answers

Postal allows you to send messages as displayed views

+3
source

I highly recommend Mvc.Mailer .

You get all the benefits of an MVC environment with forest support.

+1
source

All Articles