Print Page | Close Window

sending emails with a timed stored proced

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9801
Printed Date: 29 March 2026 at 12:00pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: sending emails with a timed stored proced
Posted By: stephen
Subject: sending emails with a timed stored proced
Date Posted: 13 February 2004 at 8:56am
 have an application where I need to send an email notification to all the users that have not logged on for more than three days.

I cant use the sql Server email function on DTS because I do not have outlook configured.

I am looking to create a stored procedure that calls the "System.Web.Mail" after sheduling it with sql server to send an email to the users, so that it runs the stored procedure every morning automatically.

is this possible? is so does anyone no how to go about it or a tutorial online? Thanks

-------------
"Doing easily what others find difficult is talent; Doing what is impossilbe for talent is genius." -- Henri Frederic Amiel ( 1828-1881)
http://www.121People.com - www.121People.com



Replies:
Posted By: Diep-Vriezer
Date Posted: 13 February 2004 at 11:05am

I think you need to create an application, which you need to run at the server. Or, you create a page with a timer, which is sheduled to tick every 1 day or so. Then you can peform your code, which is basicly running trough some tests to see if an account is inactive.

I think it's better to do it with an application, whichs doesn't have to be running on the server. If you create an application (or windows service) which calls a web service (or bypasses a web server and calls the SQL server inmidiatly) it will work. Otherwise, not sure if it's possible, since ASP.NET pages are only executed on load (or I'm completely wrong)



-------------
Gone..


Posted By: michael
Date Posted: 13 February 2004 at 5:46pm
Like Mart says, it all depends on the access you have to the server, if you have only a shared webhost your possibilites are limited, you would have to kick it of the server as you cannot call a webpage from a sql scheduler and sql does not support system.web.mail yet, yet because with the release of Yukon you would be able to do that but that'll be a while. So I would just create a simple page that your computer kicks off every now and so often...

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Mart
Date Posted: 15 February 2004 at 5:44am
I didn't say anything Think your hearing things


Posted By: michael
Date Posted: 15 February 2004 at 11:37am
I could have sworn it was you.... WEll DP then

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: dpyers
Date Posted: 15 February 2004 at 12:34pm

Must be the voices speaking to you again  

But as noted, on shared hosting your options will be limited. Many companies with dedicated servers also lock down the sql mail functionality, some also lock the scheduler.

If it's important to you, get a $3-$4/month unix account that includes cron. Use lynx through cron to kick off a script and route the output to /dev/null.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: stephen
Date Posted: 16 February 2004 at 4:28pm
thanks guys

-------------
"Doing easily what others find difficult is talent; Doing what is impossilbe for talent is genius." -- Henri Frederic Amiel ( 1828-1881)
http://www.121People.com - www.121People.com


Posted By: ljamal
Date Posted: 16 February 2004 at 10:46pm
Another means of doing is writing a VBScript file and scheduling it to run on a desktop with an SMTP server or email component installed.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: Phat
Date Posted: 16 February 2004 at 11:39pm
Check out http://www.script-schedule.com/ - http://www.script-schedule.com you can use them to call an asp page.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net