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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

My client sends data in an Excel file to me to load them into Staging database. The file contains many sheets that they have same structure. In this article, I would like to share the simple way to load data of multiple sheets by using SSIS.
A couple of weeks ago, my client requested me to implement a SSIS package that allows them to download their files from a FTP server and archives them. Microsoft SSIS is the powerful tool which allows us to proceed multiple files at same time even w…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

863 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

26 Experts available now in Live!

Get 1:1 Help Now