Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
| Search | Today's Posts | Mark Forums Read
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 29th, 2008, 11:36 AM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default Store procedure,auto send email after X days.(+asp

halo there, can i ask about MS SQL store procedure at tis section?
i would like to ask..how can i write a Store procedure for auto generate the email 30days after the submitted date and send to the users? can someone plz help me on this? thank you.

  #2 (permalink)  
Old February 29th, 2008, 01:15 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You could create some kind of queue table for the emails, add the emails to it with the desired send date, then create some kind of scheduled task (such as a SQL job) that runs the send logic.

-Peter
peterlanoie.blog
  #3 (permalink)  
Old February 29th, 2008, 01:15 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Also, the scheduled job would need to be set up to run daily or more.

-Peter
peterlanoie.blog


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Execute Store Procedure with Asp.net in NHi mukeshhaval .NET Framework 3.5 0 October 15th, 2008 04:49 AM
auto tracker function &send personalised email miracles Excel VBA 1 April 27th, 2007 04:43 AM
Auto send email from command button underscore10304 Access VBA 3 September 26th, 2006 06:41 AM
asp/sql auto email on specified date keyvanjan Classic ASP Professional 2 March 5th, 2006 09:14 PM
asp/sql auto email on specified date keyvanjan Classic ASP Databases 0 February 26th, 2006 03:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.