Reputation: 1032
I am undertaking a project which will involve implementing a web based application with a backend database.
One of the requests are to send emails based on rules e.g. if customer has not responded within a week then send an email to remind them to fill the details.
Currently I am looking at using .net and sql server. Could any give me any ideas of how this can be achieved? Are there any third party tools that could do such a request?
Thanks in advance.
Upvotes: 2
Views: 3410
Reputation: 29
The proper way to do it is with a database job, schedule every day, and executing a store produce to analyze the data.
Look for SqlServer Agent Job.
Upvotes: 0
Reputation: 3108
You can use database mail on sql server in order to reach your goal. You can configure your mail server on management node on sql server ,database mail.
Also you can use sp_send_dbmail
in order to send your email based on your condition and query.
At last you should configure sql server agent and insert your query inside a job on it and schedule it to excute.
Upvotes: 1
Reputation: 6167
You haver to run some script/program (in whatever language) periodically. On UNIX systems, you can use cron for that.
To send the mail (assuming you are on linux), it's the easiest way to use your local sendmail, either directly by calling the binary or through any library whatever language you are planing to use provides - now the only thing that is left is the actual query.
For windows systems, I'm not sure what tools are suitable to replace cron and sendmail, I'm sorry.
Upvotes: 1