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,204 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
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…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

776 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