Main Content

Going Postal - Generating email with View Engines

A talk by Andrew Davey at mvcConf 2

About the Talk

February 8, 2011 4:00 AM

Virtual

Virtual

The .NET framework provides a simple API for sending email. I assume you are already acquainted with the handy namespace System.Net.Mail. However, dynamically generating the content of an email is still a bit tricky. Code that concatenates strings and variables is no fun to write or read! What we need is a way to write text (or html) templates which will be rendered with some data. ASP.NET MVC already has exactly this in the form of Views. So let's reuse the view engine infrastructure to create our emails. I created a simple library called Postal that does just that. This session will introduce Postal and walk through using the library.

Ratings and Recommendations

Avg. Rating

Average based
on 23 ratings

comments powered by Disqus