August 27, 2002 at 6:49 am
I need to query a SQL Server database once per day and send emails to clients who have licences that are about to expire. How can I do that automatically using SQL Server?
August 27, 2002 at 7:48 am
First you must set up SQL mail or use the CDNTS object to send email.
Then you would build a SQL Agent job that runs once a day. In the SQL Agent job you could call a stored procedure that would query your database and determine if licenses are about to expire, and if they are it would build the email and send it.
Here are a couple of links that might help:
- How to configure SQL Mail: http://support.microsoft.com/default.aspx?scid=kb;en-us;q263556
- Send E-Mail Without Using SQL Mail in SQL Server :http://support.microsoft.com/default.aspx?scid=kb;en-us;q312839
Hope this helps some....
-------------------------
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply