Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
1,657 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 43

Accepted Solution

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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

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…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
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 different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

927 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