SSIS - Sending emails to a dynamic group of recipients

  • I would like to setup an SSIS package to pull a select group of email addresses from a SQL database and send an email to each (for survey purposes). Is it at all possible to do something like this in SSIS and if so, does anyone have ideas on how I would accomplish this.

    I understand that the To line is limited to 256 characters, so perhaps it would be better if I could somehow loop for each row of the SQL result set and send the email to each recipient at a time. Just not sure how I would accomplish this.

    Thanks for any help you can provide.

  • Hi there

    I had to do this recently (send emails with attachment to one person at a time).

    here is what i did

    - Set up a table with the user's details (i.e. name and email address)

    - Created a loop to loop through the table and select the name in a variable

    - in the loop add an send email task

    - in the mail task in the mail page - set the from address and set the Message Source Type to "Direct Input" and enter message source i.e. body of message etc

    - go to expressions page - and in the expressions section - click the ellipses on the line that says expressions and select ToLine from there and enter the name of the variable that you have used in the loop to select the value in here.

    This article can help further -

    http://www.sqlis.com/sqlis/post/Shredding-a-Recordset.aspx

    Let me know if i can help further

    Cheers & gud luck

    Vani

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply