View Single Post

   
  #1 (permalink)  
Old 02-29-2008, 05:32 AM
Larisa
 
Posts: n/a
Default Best way to send email from a stored procedure (dynamically changing paramenters and attachment)

Hello everyone,

I need advice of how to accomplish the following:
Loop though records in a table and send an email per record. Email
recipient, message text and attachment file name - that's all changes
record by record.

Is it doable from a stored procedure (easily I mean, or am I better off
writing a VB app)? There are so many options of sending mail from SQL
server - CDONTS, SQL MAIL TASK, xp_sendmail. What's easier to implement
and set up?

Thanks a lot!!!(links and fragments of sample code would be greatly
appreciated)
Larisa

Reply With Quote