Unable to read data from the transport connection: net_io_connectionclosed.

787
Views
1
Answers

I am trying to send emails using SMTP. I have a list of emails from which the code picks an email at random to send an email. Sometimes I get an error saying

system.io.ioexception unable to read data from the transport connection net_io_connectionclosed

The stack trace says

InnerException: System.IO.IOException
       
Message="Unable to read data from the transport connection: net_io_connectionclosed."
       
Source="System"
       
StackTrace:
            at
System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)
            at
System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine)
            at
System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)
            at
System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
            at
System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
            at
System.Net.Mail.SmtpClient.GetConnection()
            at
System.Net.Mail.SmtpClient.Send(MailMessage message)95

Any suggestions??

edit | flag
William Patrick
Asked on: Mar 22, 2012 at 11:56PM

1 Answers

135
4
135

The Possible causes may be the to address email is not an valid email.

Using an valid recipient email address fixed this problem to me.

edit | flag
Gokul A
Answered on: Mar 23, 2012 at 12:01AM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags