Solved

[Send Mail Task] Error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host

Posted on 2014-10-08
2
1,080 Views
Last Modified: 2016-02-11
Hi Experts,

I am trying to build an SSIS package which has to send an email to certain users. I took a SQL Mail Task from the toolbox and dropped it in my package.

There weren't many settings that were required it seems. The main setting that was SMTP Server Setting in the SMTP connection manager, I picked it from my outlook (exchange server), and put it in the SMTP Connection Manager.

When I test this particular SQL Mail task, it fails with the following error:
[Send Mail Task] Error: An error occurred with the following error message: "Failure sending mail.  System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.  System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host".

Now I cannot figure out if this error is due to incorrect SMTP server Connection settings or anything else. Any help in this regard will be greatly appreciated.

There wasn't much code as such for me to put here or any screenshot. Still if there is anything in particular that requires to be checked or seen, please let me know and I will put it here.

Thanks in advance.
Amit
0
Comment
Question by:AmitJain001
2 Comments
 
LVL 42

Accepted Solution

by:
EugeneZ earned 500 total points
ID: 40369594
it is possible you need to adjust SMTP setting: check is port opened,
Check with your Exchange admin,  etc
e.g check if your smpt server is opened for you
telnet your.mail.com 25


more:
How to check an SMTP connection with a manual telnet session
http://www.port25.com/how-to-check-an-smtp-connection-with-a-manual-telnet-session-2/

http://social.msdn.microsoft.com/forums/sqlserver/en-US/d555bb8a-ca64-457a-831b-41ea9b09389f/sendmail-task-in-ssis-package-fails-occasionally-need-help
0
 

Author Comment

by:AmitJain001
ID: 40382955
Thanks Eugene,

It was indeed the SMTP server information that was incorrect and once I put the right information, it worked well.
I also tried to extract SMTP server information using telnet as you suggested but it didn't work for me. Actually I couldn't make telnet to work for me despite following the instructions from your first link. I will get back to this at a later stage but for now Thanks for helping me out.

Cheers.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Query Missing Money orders... 6 72
SQl query 19 14
Trouble connecting to SqlServer database 4 34
Test a query 23 18
My client sends a request to me that they want me to load data, which will be returned by Web Service APIs, and do some transformation before importing to database. In this article, I will provide an approach to load data with Web Service Task and X…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now