1

I am looking for a package to send emails using razor views as templates. So far I have found the following options.

MvcMailer - Looks like it has issues working with MVC5+ and hasn't been updated in a while.

ActionMailer.Net - No longer supporred

I found a good article on writing one from scratch here. http://mehdi.me/generating-html-emails-with-razorengine-introduction/

Are there any other libriaries which will work with MVC5+ application for creating email templates based on razor views?

tereško
  • 58,060
  • 25
  • 98
  • 150
CountZero
  • 6,171
  • 3
  • 46
  • 59
  • What tool did you go with in the end? MvcMailer has a new version (Install-Package MvcMailer-vs2013 -Pre) that seemed to work well for me, but currently having problems with it when published to Azure – Peter Kerr Feb 11 '15 at 17:30
  • USed the same version as you and it worked fine though it is limited to use on web applications due to its requirement for an active http context. What issues are you having Peter? – CountZero Feb 12 '15 at 13:56
  • Thanks - got it working - was due to its reference on MVC4, and it not picking up the binding redirects in the web.config. For new Azure deployment, the binding redirects needed to also be in appName.WebRole.dll.config – Peter Kerr Feb 23 '15 at 11:15

1 Answers1

1

you can use Mailzory for sending emails. It compiles razor templates and does not depend on httpcontext.

Ehsan Mirsaeedi
  • 6,924
  • 1
  • 41
  • 46
  • Looks interesting. Will investigate when it comes out for .NET Core (though I'd advise waiting until they port the email classes into the framework before begining work on that!) – CountZero Oct 10 '16 at 10:16