Hi I am trying to call RazorEmail Template from my Controller as below
public EmailResult TestEmail(EmailModel model)
{
To.Add(model.Email);
From = "[email protected]";
Subject = "Testt Mail";
return Email("EmailTemplate", model);
}
in view my Template is Under
~/Views/Template/EmailTemplate.html.cshtml
@inherits System.Web.Mvc.WebViewPage
@model W2G.Models.EmailModel
First when I trying to access I have following error
The view must derive from WebViewPage, or WebViewPage<TModel>.
I got the solutions from here https://mcmap.net/q/268523/-the-view-must-derive-from-webviewpage-or-webviewpage-lt-tmodel-gt
But now I am getting this error . Please kindly help me . It took my lots of time
@inherits System.Web.Mvc.WebViewPage<W2G.Models.EmailModel>
– Littlefield<W2G.Models.EmailModel>
? – Littlefield