SIGN UP MEMBER LOGIN:    
ARTICLE

How to Send Email Using Send Mail Task of SSIS

Posted by Rajeev Kumar Articles | SQL Server 2012 November 03, 2010
In this article we will see how to send email using Send Mail Task of SSIS
Reader Level:

Step 1: Create a SSIS Package say SendMailTaskDemo

Step 2: Drag and drop a Send Mail Task Item from Control Flow Items

1-small.gif 

Step 3: Right click on the Connection Manager pane and Select New Connection

2.gif 

Step 4: Select SMTP connection manager and then click Add button.

3.gif

Step 5: Enter Name, Description and IP of the SMTP Server and then click OK.

4.gif

Step 6: Now Right click on the Send Mail Task Item and Select Edit.

5.gif

Step 7: Go to Mail tab of Send Mail Task Editor and then Select SMTP Connection Manager (the name of the SMTP connection manager) in the SmtpConnection and also enter the From, To, Cc, BCc, Subject etc fields.

6.gif

There are three types of Message Source Type : Direct Input, File Connection or Variable.

Direct Input - The message you type in the Message Source will be the body of the Mail.

File Connection - the content of the message will come from any file which will become the body  of the mail.

Variable - the content of the message will come from any SSIS variable which will become the body   of the mail.

Here we chose Direct Input

Step 8: You can also set the Priority : low,High or normal(default) and any attachments.

7.gif
 
Click Ok to finish.

Run the Send Mail task to Send the mail to whom u want !!

All queries are welcome !!

Login to add your contents and source code to this article
share this article :
post comment
 

Hi Diana, First try to verify that remote system is accessible from all clients means there is no firewall be on port 25.

Posted by Rajeev Kumar Apr 11, 2012

hi, Thanks for the article, it's really helping. But I got this error when execute the package : [Send Mail Task] Error: An error occurred with the following error message: "Failure sending mail. System.Net.WebException: Unable to connect to the remote server System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 173.194.79.109:25". Do you have any idea what's the problem ? Desperately need help ! thanks

Posted by Diana Andriyani Apr 10, 2012

Thanks

Posted by Rajeev Kumar Mar 29, 2011

I do not have the control flow items in my toolbox??

Posted by kalpa vachhani Feb 20, 2011

Keep up the good work Rajeev.

Posted by Mahesh Chand Nov 03, 2010
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Become a Sponsor