PDA

Click to See Complete Forum and Search --> : Automatic email alerting for web app using ASP?


ereynol
Mar 26th, 2000, 07:25 PM
Hi,
I'm wondering if any knows how to create the following component.
I need to create some way of automatically sending email alerts from an event scheduler I created using ASP. The way the scheduler works is that when a user is creating a new scheduled event, they select a name, date and have the option of sending themselves an email alert before the scheduled date.
Therefore I need some way of automatically getting a component to run on my NT Server which will scan the system every day to see if an email alerts should be sent on that day for all users of the system. Details of schedules are stored in an access database. The alerts do not need to be sent at certain times during the day but just on certain dates. This component would be similar to the kind of feature you would find on Yahoo calendar or excite for sending email alerts.

Thanks in advance for your help, if any one can think of a solution or knows of any way of doing this.
-Enda

compuGEEK
Mar 28th, 2000, 04:00 AM
Hi

If your app is going to reside on a NT box you could use CDO to send email.

CDO is really cool...and it can be accessed from ASP. Make sure you reference CDO before you begin.


For instance:

set objMail= CreateObject("CDONTS.Newmail")
objMail.send ("Recipient@somewhere.com", "Sender@here.com", "Subject", "Email Body")
set objMail = nothing

That's it...

rammy
May 17th, 2001, 06:05 AM
hi,
im loooking at something similar to what ereynol described. I dont have a problem sending mails....but how do i automate the querying of the database say once a day??????

thanx a ton!

rammy
May 18th, 2001, 03:49 AM
anyone??

will it be better if i use the global.asa....but in this case my code will work only if there r visitors to my site........


so, if i use what Clunietp suggested (which is described at:

http://support.microsoft.com/support/kb/articles/Q221/4/95.ASP)

and use the task scheduler.....what happens when i need to host my pages on another server????

kayoca
May 18th, 2001, 04:57 AM
Originally posted by rammy

will it be better if i use the global.asa....but in this case my code will work only if there r visitors to my site........

So you can visit your site everyday.. ;)

rammy
May 18th, 2001, 05:03 AM
yes, i can do that...........but that doesnt help me decide which method to follow....... :confused:

MadWorm
May 18th, 2001, 06:36 PM
On NT a scheduler service can be accessed by issuing AT commands at the dos prompt line.

So write a VB exe to do what you want ie send emails and then just go to dos and type something like this,


at \\servernamehere 02:00 /every:m,t,w,th,f,s,su jobtorun.exe


this would run your job every day of the week at 2am :)