0
votes

I am working on a SSIS Package in which I need to send an email to all those users whose email id will be retrieved after executing a Stored Procedure in the email id column

624191  Accepted    Test        [email protected]
624870  Accepted    Rejected    [email protected]
624870  Cancelled   Pending     [email protected]

Basically I need to send an email to all 3 email ids.

Steps followed:

  1. created SQL Execute task to execute the SP and created a output variable.
  2. created a foreach loop container and calling that variable from foreach through ADO enumerator.
  3. if I put the send email task in to the foreach loop container then I need to put a emailid in the TO section but I don't know how to call those email id from stored procedure directly.
  4. I dont know what to put in a Script task.
1

1 Answers

1
votes

If your SQL Server is configured to do so, you could use EXEC msdb.dbo.sp_send_dbmail

More info