How to send periodic/timely Emails

I was busy during last few months and can not spare time for my blog. However during my project i came up with a situation that I have to send emails on daily basis through system. I would like to share the different approaches which I found during my goggling.

I came across three options to accomplish this:-

1- Create a simple .exe file which sends the mails and add it in windows scheduled tasks.
How To Schedule Task in Windows XP

2- Create a Window Service, which sleeps for 24 hours after sending emails.
Simple Windows Service Sample

3- Create a JOB in Sql Server. For details see:
Automated Email Notifications using SQL Server Job Scheduler

3 comments:

  1. Zeeshan, there is another way if you want this type of CRON job in asp.net using Cache Item Callback. See it here http://www.codeproject.com/KB/aspnet/ASPNETService.aspx

    -Yahya

    ReplyDelete
  2. I will check out this one as well. Thanks for sharing.

    ReplyDelete
  3. Yahiya i have come across a good idea about alternative to Service. I will share soon. Thanks for your input. It was really useful.

    ReplyDelete