I am trying to send email for forget password while trying the below code
[HttpPost]
public ActionResult ResetPassword(ResetPasswordModel Model)
{
MembershipUser currentUser = Membership.GetUser(Model.Username);
if (ModelState.IsValid)
{
SendEmail.SendResetEmail(currentUser);
}
return View();
}
SendEmail is not coming as a property can any one provide the details which namespace we have to used to get this SendEmail.
I used the name spaces System.net.mail and System.web.mail but no use
Thanks
Bhanu
There is nothing like
SendEmail.SendResetEmailin any of the aforementioned namespaces.SendResetMailshould be a static method in a class calledSendEmailwhich handles the email operations.Please find out where you have defined that class and import that namespace. Or if you have copied the code from another project, please copy that class also to your project.