开发者

Send E-mail reminder with ASP.NET

I have a book lending system written with ASP.NET, VB.NET and LINQ to SQ开发者_如何学GoL. I want the web app to send the e-mail reminder about the due date to the borrower before the book is over-due. Should I write a desktop app to check the due date or there's another way around to send e-mail reminder?

Thank you for any suggestion.


Write a service or a console app that is run with Windows scheduled tasks, then have that consult the database for due dates, and send out emails accordingly.

Don't use desktop interaction.


Scheduled service. If your LINQ backend is a decent database (like SQL Server), you can schedule a task with the SQL Server Agent and have it fire off emails when necessary. That could be accomplished via script, or a CLR SQL assembly (effectively, a .net assembly that plugs into the SQL server).


Depending on how much traffic the site sees, you could make use of HTTP Cache like how StackOverflow does. You can read about it in this blog post. Although the blog appears to be down right now, so here's the Google cache.


If you write a windows desktop app then it will not run if you don't login in. You can write a windows service and install it in the server and it can send out reminder emails.


I think a windows service is suitable for this task. Take a look at that question about using timer with a windows service.


A great little starter tutorial i have bookmarked for windows services here


I would check out Quartz.NET an open source job scheduler for the .NET platform. You can use it to perform scheduled tasks inside of a Windows service. For example, you could schedule a task to run every morning and have it query your database and then send out an email if the due date of a book is within the range.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜