dbTalk Databases Forums  

sp_send_cdosysmail replacement in SSIS? Need to send mail...

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss sp_send_cdosysmail replacement in SSIS? Need to send mail... in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Scott Townsend
 
Posts: n/a

Default sp_send_cdosysmail replacement in SSIS? Need to send mail... - 11-23-2005 , 01:09 PM






A while back we found a Stored procedure on the net from MS that allowed you
to send mail.

We used this SP in a few of our DTS jobs. We have a Table that we enter in
all of the emails that we want the system to generate for us. Then loop
through all the non-processed emails and send the info to
sp_send_cdosysmail.

I know there is a Send Email Task, though How can send a set of records to
it or a script to go though all the rows that need processing?

Would I be better off just sending the rows to a script and then sending the
mail via VB.Net and not using the Send Mail Task?

Thanks,
Scott<-



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: sp_send_cdosysmail replacement in SSIS? Need to send mail... - 11-23-2005 , 02:03 PM






Scott Townsend wrote:
Quote:
A while back we found a Stored procedure on the net from MS that allowed you
to send mail.

We used this SP in a few of our DTS jobs. We have a Table that we enter in
all of the emails that we want the system to generate for us. Then loop
through all the non-processed emails and send the info to
sp_send_cdosysmail.

I know there is a Send Email Task, though How can send a set of records to
it or a script to go though all the rows that need processing?

Would I be better off just sending the rows to a script and then sending the
mail via VB.Net and not using the Send Mail Task?

Thanks,
Scott<-


Use the Execute SQL Task and the For Each Loop.

To drive a loop off a table, get the data into a variable using an Exec
SQL Task, results as full row set. Then For Each Loop with the ADO
enumerator to get the values out and split them into variables for use
within the loop.

I would actually skip this and use pure T-SQL all the way. I'd use
sp_smtp_sendmail and call that within a loop inside a single T-SQL
batch. It is reliable and easy to use.


--
Darren
http://www.sqldts.com
http://www.sqlis.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.