Multi Mail from a Table using SSIS
Hi all, I have a table which has three column. Id, EmailId and Message As Column Name. I want to send mail using SSIS Package at one shot using job. How to achieve this ? Thanks.. Ramesh Sahoo
November 10th, 2010 6:14am

1. Use an Execute SQL TASK and get message column values in a variable with Object datatype 2. Use For Each loop to iterate over the variable and map a variable to index(iterator) 3. Put Send mail task inside For each loop and pass appropriate parameters ( including body as iterator variable which you will get from For each loop )Rahul Kumar, MCTS, India, http://sqlserversolutions.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2010 6:37am

Hi Rahul, I am new to SSIS. I am just starting with DTS packages and creating jobs and sending mail hardcoding the using SMTP connection. But Now the requirement comes to send multiple mails to users dynamically. I got your points but I do not know how to get the column values in variables and How to call those values as array list. If Possible give some example. Thanks Ramesh Sahoo
November 10th, 2010 7:53am

I suggest you read EXECUTE SQL TASK, FOR EACH LOOP and SEND MAIL TASK. if you read these you would be able to accomplish your requirement. And dont worry about array list, SSIS doesnt have array functionality as in C# or any other languages, use variable with Object datatype it will hold your result set and then enumerator variable in For each loop will have current msg. Your requirement is simple just read abt those tasks and you will be thru.Rahul Kumar, MCTS, India, http://sqlserversolutions.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2010 8:42am

"I got your points but I do not know how to get the column values in variables and How to call those values as array list. If Possible give some example" look at this http://www.sqlis.com/sqlis/post/The-Execute-SQL-Task.aspx Thanks
November 10th, 2010 8:46am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics