| Author: Ashish Shah 26 Jul 2008 | Member Level: Gold | Rating: Points: 6 |
Hello,
Simply create one window service project which will peordically check in the database and sends the mail if requers..
For make window service perodically check you can use following code
System.Timers.Timer timerRSSNewsContentUpdateService = new System.Timers.Timer(); timerRSSNewsContentUpdateService.Interval = Convert.ToInt64(executionInterval); timerRSSNewsContentUpdateService.Elapsed += new ElapsedEventHandler(RSSNewsContentUpdaterService_TimerElapsed);
protected override void OnStart(string[] args) { timerRSSNewsContentUpdateService.Enabled = true; } protected override void OnStop() { timerRSSNewsContentUpdateService.Enabled = false; } protected void RSSNewsContentUpdaterService_TimerElapsed(object source, ElapsedEventArgs e) { //Your logic for sending the mail }
With Regards..
Ashish Shah India,Surat
|