Forums

ASP

This topic is locked

Auto Mail

Posted 04 Apr 2003 23:19:35
1
has voted
04 Apr 2003 23:19:35 Dave Thomas posted:
I have a site for my clients where they can log in and check their account status etc. Shows them when they are due for renewal and simple stuff like that.

In one of my tables with the "tblExpiryDate" field, I'd like to have an automatically generated mail (CDONTS) send them a renewal notice 2 weeks before they expire.

If rsThisUser("tblexpiryDate" Date 14 days to go
Create a mail and filter the recordset
and Send it, then notify me of sending it.

It's a real small db in access2000, vbs & asp


Regards,
Dave

UD4 | Flash 5 | SQL | Access | ASP/VBScript | XP-Pro

Replies

Replied 12 Apr 2003 10:32:32
12 Apr 2003 10:32:32 Graham Cole replied:
HI

ASP(VBscript) relies on user interaction for something to happen. There are four exceptions to this when you can set Application onStart, Application onEnd, Session onStart and Session onEnd in the Global.asa file. However I dont think this is going to be much use to you.

The only real way you can resolve this is, and it depends on whether you have access to the server, is to use Windows Scripting Host. You need to write a script that queries the database for all those who need to have an email to be sent and then use task scheduler to run the script on a daily basis.

Of course this all depends if your developing on Win2K and have root access to the server. Failing this Im not sure how to accomplish this.

Hope this helps

Graham
Replied 13 Apr 2003 10:53:12
13 Apr 2003 10:53:12 Dave Thomas replied:
Thx for the input Graham,

the site is running on Win2k, so i'm halfway there, just got to see whether i've got access to the Windows Scripting Host.

Regards,
Dave

UD4 | Flash 5/MX | Studio MX | SQL | Access | ASP/VBScript | XP-Pro

Reply to this topic