Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 5th, 2005, 07:47 AM
Authorized User
 
Join Date: Sep 2004
Posts: 67
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: Database automated email

Hi,
I was wondering if somebody could point me in the right direction here.

What I want to be able to do is maintain a database table of subscribers (email addresses, subscription categories) and then automate the sending of an email to each subscriber at a set time each day.
The email would automatically generate itself based on news content from another database table.

I've tried googling but I don't think I'm searching under the right words because I'm coming up with next to nothing that is helpful.

 
Old March 5th, 2005, 08:21 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

automate the sending of an email to each subscriber at a set time each day -- Create a job in SQL server runts at scheduled time (it can call a stored procedure)

Use xp_smtpsendmail to send e-mail (download here http://www.thorpesoftware.com/readme.htm)

for HTML stuff use sp_makewebtask (look in the books online)
 
Old March 5th, 2005, 08:50 AM
Authorized User
 
Join Date: Sep 2004
Posts: 67
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Okay, that appears to make sense so far although I'll need to do a fair bit of research on creating stored procedures because my knowledge in that area is quite cloudy.

Regarding the recipients, how can I send the email so that each recipient the email goes to cannot see the email addresses of the other recipients. Is there some form of mailing list integration with Microsoft Exchange Server that I could do?

 
Old March 5th, 2005, 09:09 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

store all the recipient e-mails in a staging table..then loop through the table (use cursor fetch a record send an e-mail then fetch another record..I hate to use cursor but.. )

 
Old March 5th, 2005, 10:49 AM
Authorized User
 
Join Date: Sep 2004
Posts: 67
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks for your help.

I also just managed to come across this Microsoft article that could be a useful way of achieving the task too.

http://support.microsoft.com/kb/q221495/






Similar Threads
Thread Thread Starter Forum Replies Last Post
Automated E-mail Envirochemist Access 3 April 25th, 2008 11:23 AM
Automated Email from Access Database ScubaBoy80 Access 2 June 18th, 2007 08:37 AM
Automated email ashik112 Classic ASP Professional 3 March 14th, 2007 11:11 PM
Database Write and Email inquiringminds BOOK: Beginning ASP 3.0 9 September 21st, 2004 06:33 AM
Sending an automated email luxx Excel VBA 4 January 2nd, 2004 05:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.