Scenario:
We receive different files in one of the folder. Before we start our loading process, we have a requirement to send all the file names in the email to our team by using SSIS Package.Solution:
In this video we will be able to solve above scenario, we will be using following components of SSIS Package
- How to Create Parameters for Folder Path, EmailTo and EmailFrom
- How to use For-each Loop Container to loop through all the file in a folder
- How to use ReadOnlyVariables and ReadWrite Variables in Script Task
- How to create list of list and save into a variable
- How to use Expressions in Send Mail Task for MessageSource( Body), LineTo and FromLine
Code used in the Script
Dts.Variables["User::FileNamesList"].Value = Dts.Variables["User::FileNamesList"].Value.ToString() + Dts.Variables["User::FileName"].Value.ToString() + "\r\n";
Expressions used in the Video
Subject :
@[System::PackageName]+ " Package completed successfully in Prod"
Expression for Message Source:
"Hi Team
Please find the list of File name in Input Folder \n "+
@[User::FileNamesList]+"
Thank you
Tech Brothers"
How to Email file names from a Folder by using Send Mail Task in SSIS Package - SSIS Tutorial
Related Posts/Videos on Send Mail Task
- Create Load Summary Email logic in SSIS Package
- How to Configure Send Mail Task and Send Email in SSIS Package
- Create a file with Date From SQL Server Table and Send as Attachment in SSIS Package
- Attach Multiple Files Dynamically in Send Mail Task in SSIS Package
- Send Error Email with Error Code, Error Description by using Send Mail Task in SSIS Package
- Use Send Mail Task with Precedence Constraints in SSIS Package
- Read Subject,Recipient and Body from SQL Server Table and Send Email by Using Send Mail Task
- Read EmailTo,EmailFrom,Subject and Body From Text File and Send Emails by using Send Mail Task in SSIS Package
- Send Load Summary Email by using Send Mail Task in SSIS Package
When choosing email marketing, many entrepreneurs start using a tool to track the actions of sent emails. In this regard, I want to share with you the article https://roboticsandautomationnews.com/2023/01/31/are-email-trackers-legal/59732/ about the legality of using email trackers. In fact, such a tool is very useful for businesses, but you will only be able to track recipient activity on emails that you send. Therefore, it is a perfectly legitimate solution for successful marketing.
ReplyDelete