Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - sending emails with a timed stored proced
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

sending emails with a timed stored proced

 Post Reply Post Reply Page  12>
Author
stephen View Drop Down
Newbie
Newbie


Joined: 23 August 2002
Location: United Kingdom
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote stephen Quote  Post ReplyReply Direct Link To This Post Topic: sending emails with a timed stored proced
    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
Back to Top
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Post Options Post Options   Thanks (0) Thanks(0)   Quote Diep-Vriezer Quote  Post ReplyReply Direct Link To This Post 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..
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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...
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2004 at 5:44am
I didn't say anything Think your hearing things
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2004 at 11:37am
I could have sworn it was you.... WEll DP then
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.



Edited by dpyers

Lead me not into temptation... I know the short cut, follow me.
Back to Top
stephen View Drop Down
Newbie
Newbie


Joined: 23 August 2002
Location: United Kingdom
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote stephen Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2004 at 4:28pm
thanks guys
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.