.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> DataBase >> Post New Resource Bookmark and Share   

 Subscribe to Articles

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

Posted By:Karthikeyan Anbarasan       Posted Date: February 27, 2011    Points: 100    Category: DataBase    URL: http://www.dotnetspark.com  

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
 

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

Basics of SSIS and Creating Package - SQL Server Integration Services (SSIS) - Part 1

Transforming SQL Data to Excel Sheet - SQL Server Integration Services (SSIS) - Part 2

Export Data using Wizard - SQL Server Integration Services (SSIS) - Part 3

Import Data using Wizard - SQL Server Integration Services (SSIS) - Part 4

Building and Executing a Package - SQL Server Integration Services (SSIS) - Part 5

Options to execute a package in SSIS - SQL Server Integration Services (SSIS) - Part 6 

Options to Deploy a package in SSIS - SQL Server Integration Services (SSIS) - Part 7

Scripting in SSIS Packages - SQL Server Integration Services (SSIS) - Part 8

Breakpoints in SSIS Packages - SQL Server Integration Services (SSIS) - Part 9

Check Points in SSIS Packages - SQL Server Integration Services (SSIS) - Part 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.


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend