var sendEmail = new EmailRegisterViewModel
{
EmailProp = new EmailProperties
{
To = model.Email,
Msg = "derp",
ViewName = "ConfirmRegistration",
},
CallBackUrl = callbackUrl,
UserName = model.Username
};
sendEmail.Send();
The ViewName does not get picked up and throws an error if i do not name the view to be used EmailRegisterViewModel . I am not sure if this has got to do with the fact that i am using areas to define my sections. It is still looking in the base views folder, but not for the assigned name.
It also requires a _Layout.cshtml ( There is no point in having a _Layout file in the base views folder and all the sections of the site are held in areas with there own _Layouts ) even though the _ViewStart.cshtml is
@{ Layout = null; }
I can still send , and everything works , just curious to its behavior
I currently have this cod to send the email
The ViewName does not get picked up and throws an error if i do not name the view to be used
EmailRegisterViewModel
. I am not sure if this has got to do with the fact that i am using areas to define my sections. It is still looking in the base views folder, but not for the assigned name.It also requires a
_Layout.cshtml
( There is no point in having a _Layout file in the base views folder and all the sections of the site are held in areas with there own _Layouts ) even though the_ViewStart.cshtml
is@{ Layout = null; }
I can still send , and everything works , just curious to its behavior