HI,
I want to send a very fancy email to users. thats look and feel is same as a web page.
one very bad way to use StringBuilder and append text in it.
but i am in search of a best practice solution. where the page is easy to redesign.
I need solution for both ASP.NET & MVC.
any idea.
thanks,
In ASP.NET MVC, I've been enjoying ActionMailer.Net.
You could try Postal or MvcMailer both are available via NuGet and both allow you to send emails rendered from MVC Views.
Andrew Davey done a good video presentation on Generating email with view engines using Postal at mvcConf2.
You can do that by writing your email template in a separate file (will be good for redesign if it is an HTML file), and then read this file like reading any file and fill it with variables, then use the result as a string to send in an email.
Another way of doing that is by using T4 Templates to compile all of the email templates in the separate assembly.
I blogged about that approach http://asmiki.wordpress.com/2011/05/20/using-t4-templates-for-compiling-net-email-templates/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With