I have user table created by Identity.

I want to send an email to corresponding user if he did not update his password for six months. I have to send mail after 60 days and after that every 3 days. I am using .net framework 4.5.2, asp.net, mvc 5, identity2
My model

    public class IdentityUser : IUser
        public IdentityUser();
        public IdentityUser(string userName);
        public DateTime LastUpdateDate{get;set;}

My controller

public ActionResult PasswordSendMail()
    my code for checking six month...

But the mail has to be sent once at the 60th day from the LastUpdateDate and after every three days.
If i placed the code in controller, the action should be called. I have to send without calling any controller specifically.
I want to sent mail to users, whether user is logged in or not. when the time reached the mail should be sent by background process. Thanks in advance

Related posts

Recent Viewed