Kishan Gajjar
Kishan Gajjar

Reputation: 1138

Email scheduling in C# (ASP .NET)

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.?

Upvotes: 5

Views: 4621

Answers (5)

ncakmak
ncakmak

Reputation: 4044

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.

Upvotes: 0

Pabuc
Pabuc

Reputation: 5638

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.

Upvotes: 0

user368191
user368191

Reputation:

I guess this is something similar here.

Upvotes: 1

Aim Kai
Aim Kai

Reputation: 2909

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?

Upvotes: 1

Ives.me
Ives.me

Reputation: 2404

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

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

Upvotes: 2

Related Questions