In many web application we need to send schedule(automatic) emails and we schedule them.
For this, we normally used windows services or windows
- Sends emails on a
the message at daily, weekly, monthly or yearly
But in a shared host
environment you're out of luck for running these kind of application because you
don't have access on a shared server.
We can perform scheduled job process through our ASP.NET web projects without buying dedicated servers.
1. No need to buying dedicated servers.
2. Perform scheduled job process through our ASP.NET web application.
Using the code
As we know the web server IIS is continuously running, we can add a
timer in the application and the timer can manage all these activities.
void Application_Start(object sender, EventArgs e)
System.Timers.Timer myTimer = new System.Timers.Timer();
myTimer.Interval = 5000;
myTimer.AutoReset = true;
myTimer.Elapsed += new ElapsedEventHandler(myTimer_Elapsed);
myTimer.Enabled = true;
public void myTimer_Elapsed(object source, System.Timers.ElapsedEventArgs e)
clsScheduleMail objScheduleMail = new clsScheduleMail();
public void SendScheduleMail()
For more details, please refer to the uploaded code.