Step 1: Create a SSIS Package say SendMailTaskDemo
Step 2: Drag and drop a Send Mail Task Item from Control Flow Items
Step 3: Right click on the Connection Manager pane and Select New Connection
Step 4: Select SMTP connection manager and then click Add button.

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

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

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.

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.

Click Ok to finish.
Run the Send Mail task to Send the mail to whom u want !!
All queries are welcome !!

PabloPosted Mar 21, 2024, 6:51 AM
How to send HTML formatted email using Send mail task ?
Dhruv PatelPosted Nov 26, 2019, 1:19 PM
Thank you for the article, but I am getting an error that says this: Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.SSIS package "C:\Users\Dhruv Patel\source\repos\Integration Services Project3\Integration Services Project3\Package.dtsx" finished: Failure.The program '[17524] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).
Kumar SwamyPosted Mar 14, 2018, 12:16 AM
How to get the SMTP server: IP address or servername.
MuniSekhar BhupathiPosted Feb 25, 2018, 1:03 PM
HI, Iam not able to find out my SMTP Server IP Address. I tried in command promt like this"ping smtp.server.com". But its showing not recognized internal or external command.
Raja TPosted Jul 30, 2016, 4:52 AM
Good one, thanks for sharing..
Ashish TPosted Jun 1, 2015, 12:15 PM
On using the smtp server nameHotmail -> Server address: smtp-mail.outlook.com I am using the same email address in from and to. When I removed ssl tick in SMTP Connection Manager I am getting below error: SSIS package "Package.dtsx" starting. Error: 0xC002F304 at Send Mail Task, Send Mail Task: An error occurred with the following error message: "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first". Task failed: Send Mail Task Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. SSIS package "Package.dtsx" finished: Failure. WHEN SSL IS TICKETD AND DEBUG IS STARTED I am getting below error: SSIS package "Package.dtsx" starting. Error: 0xC002F304 at Send Mail Task, Send Mail Task: An error occurred with the following error message: "Mailbox unavailable. The server response was: 5.7.3 Requested action aborted; user not authenticated". Task failed: Send Mail Task Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. SSIS package "Package.dtsx" finished: Failure. Let me know how this error can be solved. I have a doubt about how will my hotmail id will get logged in through BIDS, as no where are we providing the password to hotmail account.
jitendraPosted Apr 14, 2015, 5:22 AM
and add me jitendra.tech
jitendraPosted Apr 14, 2015, 5:22 AM
please give me ur skype id and email
jitendraPosted Apr 14, 2015, 5:21 AM
let me help you
Ravindran GopalanPosted Apr 14, 2013, 2:49 PM
In my system not working this send mail task error is Send Mail Task: 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 10.50.7.23:25". how to solve this sir pls tell me
Diana AndriyaniPosted Apr 10, 2012, 11:34 PM
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
kalpa vachhaniPosted Feb 20, 2011, 1:33 AM
I do not have the control flow items in my toolbox??
Mahesh ChandPosted Nov 3, 2010, 8:58 AM
Keep up the good work Rajeev.