Do you have your SMTP code ready for sending email ? if NO then visit my this answer .
Before that do these:
1. Create a console application.
2. Write a code to fetch list of emails of all the user which are suppose to recieve those email. (in this you can provide filteration od users.)
3. Add this code to send email
protected void SendMail()
{
var fromAddress = "Gmail@gmail.com";
var toAddress = YourEmail.Text.ToString();
const string fromPassword = "Password";
string subject = YourSubject.Text.ToString();
string body = "From: " + YourName.Text + "\n";
body += "Email: " + YourEmail.Text + "\n";
body += "Subject: " + YourSubject.Text + "\n";
body += "Question: \n" + Comments.Text + "\n";
var smtp = new System.Net.Mail.SmtpClient();
{
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
smtp.Credentials = new NetworkCredential(fromAddress, fromPassword);
smtp.Timeout = 20000;
}
smtp.Send(fromAddress, toAddress, subject, body);
}
4. Test it throughly.
5. build it in release mode.
6. Take the exe from your bin folder and add that into Schedule TASK of your server
7. If you dont know how to do it refer this : ..Schedule a Task[^]
8. Dont forget to mark it as answer if you have found it working for you