Unable to read data from the transport connection: net_io_connectionclosed.
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(SmtpReplyReadercaller,Boolean oneLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReadercaller) 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
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
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!