I am working on a .NET MVC3 Web Application In this my goal is to send Scheduled E-mail in which I will be using E-mail Templates. I am so confused what should I follow to acquire my goal.
I tried MVC Mailer
. But It doesn't works with Scheduler.(Fluent Scheduler)
I tried using RazorEngine
with Email templates but somehow not succeeded in attaching HTML Email Templates
.
Please Help...
Using
RazorEngine
something like this should help, is very straightforward:Hope it helps
EDIT:
Suppose you have a template called "TestTemplate":
Dear @Model.Name
Just imagine like if this were a normal cshtml view and put your model properties like this: @Model.SomeProperty
Cheers.
With the previous template located in the path I prefixed in my helper method AttempLoadEmailTemplate, then you can send an email like this: