Home > SSIS > Send Mail Task – SSIS

Send Mail Task – SSIS

In today’s busy world, communication plays a vital role between people. DBA’s are the most active people in SQL Server world. Because, they are the one in charge of mission critical and core business operation.

Apart from all, in most scenarios, they are taking care of many SQL Server instances to keep the business running smoothly.

DBA’s usually likes to automate some basic maintenance activities with SQL Agent or Window scheduler. Each task may have to execute in different time. Some are executing on specific interval for instance every 2 hours, etc. and some will start executing in mid night (off peak hours).

Anyways, they need to monitor those tasks which are scheduled to run on specific time. There are various technologies available today to alert people with short message service and many more.

In this article, we are going to learn,  how to send an email to the list of recipients from SSIS. We are going to create SSIS package to do that. I have been writing blog post (in SQLServerRider) about various database maintenance tasks in SSIS that are necessary to keep the database healthy. In the blog post, I am going to talk about how to notify DBA’s or anybody thru E-Mail using SSIS “Send Mail Task”.


Step 1: Create a package and add send Mail task to control flow layout

Step 2: Edit the task by right click on the task and select edit option and move to Mail option

Step 3: configure mail option with valid information to all options

Option 1: Configure SMTP connection

Option 2: From address – provide valid email id

Option 3,4,5: These are the normal requirement for the email configuration such as, to addresses, CC, BCC

Option 6: A string value which represents the subject of your email

Option 7: Here you can specify the source of your message. MessageSourceType: There are 3 choices available for you. You can select the one. Options are Direct Input-fixed string, File connection-message stored in a file, Variable-Message stored in a package variable

Option 8: Message Source – Base on the previous option this will ask you the required input.  In our example I am using direct input. So, I will type my mail content directly in the textbox

Option 9: Priority: you have 3 choices such as, high, normal, low. You can choose any one

Option 10: Attachments: you can specify the email attachment in this option

Finally My Send Mail Task looks like this

Step 4: click OK and execute the package.

Thanks for reading this article. your comments please 🙂

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: