Discussion Locked

Sending scheduled emails

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We post schedules for our trade contractors on our Intranet. When those schedules change we want to push an email out to the project manager to notify him of any changes made to the schedule. We would like to send out an email at 4:00am and at 4:00pm to notify the manager if there are or aren't any changes. All of the data is stored in a SQL 2000 database with SMTP already configured.

Could I do this in SQL, CDONTS, or ASPMail? Any direction would be greatly appreciated.

FYI - I already looked into creating a job notification within SQL but couldn't get it to work with my email variables.

8 replies

by mvegas

We need to send out multiple emails to multiple managers ONLY sending the schedule changes specific to him/her. Thus the email needs to be datadriven. We don't want to send an email with all of the schedule changes because some are for other non-related contractors.

by iht4

This is not possible in SQl

It is possible as last person stated to use task scheduler, but you will need to direct task scheduler to run a windows script utilising CDONTS. This allows you to pull any info you need from your DB to generate into your mail.

for more info see http://support.microsoft.com/?kbid=221495

Hope this helps
Iain

by mvegas

Thanks. This is exactly what I ended up doing and it worked great. The windows script was written to query the DB and send the data out using CDONTS. The Task Scheduler was set to run the script every morning. The solution accomplished exactly what I wanted. It was also a simple solution - not too complex.

by tomkeith

We have a product called X-Sheet, which is great for this type of custom solution, has powerfull scripting and reporting. I was just about to do a script example for emailing database reports. Read about X-Sheet at http://www.development-x.com you can download a trial. If you are interested in a sample post back a reply.

This discussion is closed to new replies.