Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trigger to send an email 30 days prior to a due date.

Status
Not open for further replies.

Kennrosie

Programmer
Nov 30, 2005
3
US
I am using visual studio.net.

I want the system to send an email 30 days prior to a due date.

Example:

Employee Performance due date: 12 Dec 2005

I would like the system to generate an email to the supervisor on 12 Nov. 2005

I have not found any material on how to perform this function.
 
You could have a timer that checked each day (using the interval property) if it was due to send an email and if it is then send it. I'd probably do it in a service though.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
How are you determine due date? Do you use SQL database to store employee and due date? If you do then you can query the due date where it will be 30 days up. Then you can call Stored procedure that will send out the email.

Look up "xp_sendmail" in SQL Online Help.

You also need to look into Windows Service to automated the application.

Let me know if you need a sample code for Stored Procedure
 
Hello abs2003,

I'd be interested in your stored proc code if you don't mind sharing it.

Have a great day!

j2consulting@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top