5

Hi want to send birthday emails to all employees which details are stored in database. I found Quartz .NET library but can't understand the code exactly. can anyone please give me some sample code.?

abatishchev
  • 95,331
  • 80
  • 293
  • 426
Kishan Gajjar
  • 1,120
  • 3
  • 22
  • 41
  • 1
    Is your database hosted with SQL Server? If so you can make a new job in sql and send the emails from inside the job code. – Stefan P. Dec 08 '10 at 13:24

5 Answers5

2

This is the first time I heard about Quartz. It looks cool.

Found this stackoveflow thread How to use Quartz.net with ASP.NET

Community
  • 1
  • 1
Ives.me
  • 2,278
  • 18
  • 23
1

Further to Ives - answer:

What about from their website:

http://www.quartz-scheduler.org/docs/examples/index.html

This blog maybe of help as well..

http://blog.goyello.com/2009/09/21/how-to-use-quartz-net-in-pro-way/

Stack Overflow Question Sending Periodic Mail according to user's Setting in ASP.net?

Community
  • 1
  • 1
Aim Kai
  • 2,926
  • 1
  • 21
  • 34
1

I guess this is something similar here.

0

You can code a small console application, a simple database with 1 table as you said which keeps dates,names and other details you need.

Simply select all rows which meets condition

Birthday == DateTime.Now

and mail them in a loop.

You can add this exe as a scheduled job with a few clicks and set it to run every day. It would also be a good practice for you.

Pabuc
  • 5,500
  • 7
  • 35
  • 52
0

You can write a script file (possibly in VBScript as a VBS file) and schedule that script file in the Windows Task Scheduler (say every morning 8 AM) on the server level.

ncakmak
  • 3,884
  • 5
  • 19
  • 17