SQL Server Integration Services (SSIS) – Part 11 – Send Mail in SSIS Packages

Karthikanbarasan
Posted by in Sql Server category on for Intermediate level | Points: 250 | Views : 14719 red flag
Rating: 5 out of 5  
 2 vote(s)

This is part 11 of the series of article on SSIS


 Download source code for SQL Server Integration Services (SSIS) – Part 11 – Send Mail in SSIS Packages

Introduction

In this article we are going to see on how to send a mail from SSIS using the SMTP services. This send mail concept is used in real time when the packages are automated and to notify the end user at certain circumstances about the execution process or also about any failure in process or any things need to be skipped as the business needs.  We have an option here as Send Mail Task which is used to perform the task which have been discussed. Let’s discuss in detail about this task.

This article will show on how to set the configuration for the send mail option and send a test mail to the end user. To follow my series of articles on SSIS packages refer to the below URL’s

SSIS Articles Part 1 to 10

Steps

Follow steps 1 to 3 on my first article to open the BIDS project and select the right project to work on integration services project. Once the project is created, we will see on how to use Send Mail Task available with SSIS.

Once you created the project drag and drop the Send Mail Task from the tool box. It will open a pop up as shown in the below screen. It has 3 sections on to that and we will see on how to configure using the options available.


General tab – This section has options to give a name and description for the task similar to the one available in common in all the tasks.

Mail tab – This is the very important section in configuration, here we have many otpions which we need to configure in order to make use of sending mails from the SSIS packages. Check the below screen for example.


You need to give your systems SMTP Server details and from, to and cc mail ids to whoever a mail has to be sent from this package.

When you click on the SMTP new server configuration you will see a window as shown below in order to input the new server details.


Expression tab - This page is used to edit property expressions and to access the Property Expressions Editor and Property Expression Builder dialog boxes.

Once we have configure then we can run the application and see how the mail is sent using SSIS package as shown in the below figure. Running the package will send a mail to the recipients and execute the package successfully.


Conclusion

SO this article helps you to do a send mail task which is very much necessary for a package to execute automatically and send a result to the end users.


Page copy protected against web site content infringement by Copyscape

About the Author

Karthikanbarasan
Full Name: Karthikeyan Anbarasan
Member Level: Silver
Member Status: Member,Moderator,Microsoft_MVP,MVP
Member Since: 1/2/2011 3:00:14 AM
Country: India
Thanks Karthik www.f5Debug.net
www.f5Debug.net
www.f5Debug.net Around 5 years of experience in Microsoft technologies like ASP.Net, VB.Net, C#.net, SQL server, Biztalk Server, WCF, WPF, SSIS, SSRS, SSAS, AJAX and working as Senior Analyst in a US based MNC.

Login to vote for this post.

Comments or Responses

Posted by: manikandanpszsl-20650 on: 2/7/2013 | Points: 25
nice article. But i need to send mail to intimate my data tresferred correctly or not to my superior. Is it passible to mail sent once process end? Can i set the break point in "sent mail task"

Login to post response

Comment using Facebook(Author doesn't get notification)