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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto e-mail by date

Status
Not open for further replies.

Miditen

Technical User
Jul 17, 2001
23
US
I have an expiration date stored in my database. I would like to use CDONTS to send an e-mail when that date is approaching. (The e-mail portion is already working - I just need some ideas on the date function.) Thanks!
 
Are you looking for something along these lines?

if date() = xdate then
send email
end if
 
That exactly what I'm looking for. But what triggers the comparison? This database may only be accessed several times a week and if it's not on the day I've designated won't the IF statement always come up false?
 
Miditen,

Do you have access to the server desktop, or is this hosted by an ISP ?

If you have access to the server desktop, like I do, I setup Microsoft Scheduler to run an ASP page every 15 minutes. That page does the comparisons and sends the emails accordingly.

You can setup the autoscheduler to run an straight ASP document in your application. It will launch a browser window on the desktop when you do this but you can set the autoscheduler to close the browser window in 60 seconds. What's nice is that the autoscheduler will continue to work, even if you're logged off of the server and in this case, the browser window doesn't appear, but the ASP script still runs..

ToddWW :)
 
Miditen,

What am I thinking, you don't have to set the autoscheduler on the server. You can set Microsoft AutoScheduler on any computer with a web browser and access to that website.

Works the same way..

ToddWW :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top