开发者

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


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

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


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?


I guess this is something similar here.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜