Attach Multiple Files Dynamically in Send Mail Task in SSIS Package - SQL Server Integration Services(SSIS) Package


We have multiple files in one of the folder, we need to create an SSIS Package that can attach all the files from that folder and send to required recipients.


In this video we will learn how to send multiple files as attachment in SSIS Package by using Send Mail Task. We will also learn below components as part of solution

  1. How to Create SSIS Package Parameters
  2. How to use Foreach Loop Container to Loop through Files in a Folder
  3. How to use Variables in SSIS Package to build attachment list
  4. How to use Send Mail Task in SSIS To send Multiple File Dynamically
  5. How to use Expressions in Send Mail Task in SSIS Package
Code used in the Script Task in this video

Dts.Variables["User::Attachment"].Value = Dts.Variables["User::Attachment"].Value +
Dts.Variables["User::FileFullPath"].Value.ToString() + "|";

How to send Multiple Files as Attachment by using Send Mail Task in SSIS Package - SSIS Tutorial

  Related Posts/Videos on Send Mail Task