Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-11-01 : 08:03:47
|
| Steve writes "I'm a beginner with SQL and am trying to set up a scheduled job to send emails to a list of users who are held in a SQL table. I have read the "Building a Mail Queue System" and understand most of it up to the point where it is explained how to send email usign VBScript.How do I include the VBScript code into my SQL server database or is that not possible and it has to be an external application?Is it possible to select a recordset from the SQL (select * FROM TABLE.....) and use that output to run the mailer code?Any pointers would be most helpful." |
|
|
clubhi
Starting Member
4 Posts |
Posted - 2006-11-01 : 14:44:46
|
| The VBScript just empties out your mailqueue table and sends the emails. The script itself has to be ran each time you want to empty that queue. The tutorial suggested that you set it up as enterprise job (getting the database to execute the script on a scheduled basis). That is performed inside enterprise manager and right click on a table to schedule a job. You could also schedule a job under windows to run this on an interval.I took another route. I actually used that code and made a Windows service that empties the table and sends out the emails. If you are not a programmer this probably wouldn't be the route to go. But if you know how to create one it would have its advantages. |
 |
|
|
|
|
|