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,430 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
Eugene Z 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

617 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