Reputation: 2851
Im about to develop a site which will need 2 types of email function:
the first will be simple enough, just a realtime email using system.net.mail when certain conditions are met in the underlying DB. the second is to send out an email at the end of each day covering everything that happened during the day. WOuld that have to be set up as a scheduled task?
thanks
Upvotes: 0
Views: 624
Reputation: 1062
Rather than having a console application that is kicked off via a scheduled task, you could also write a workflow or Windows service that can manage the emailing. That provides the capability to schedule emails different times of the day for different use cases without having to worry about scheduled tasks.
Upvotes: 0
Reputation: 19365
Create a console application that sends the e-mail. Use the windows taskscheuduler to start that console application every day at xx pm.
Upvotes: 0
Reputation: 108957
The first type can be done from withing asp.net but for the second type, I'd create a console based app and create a scheduled task to run it at the end of the day every day.
Upvotes: 1