Mail sending failed
-
When i try to send i caught as exception like below, System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. 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.SmtpReplyReader.ReadLine() 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) and mycode is
protected void Button1_Click(object sender, EventArgs e) { try { MailMessage mail = new MailMessage(); mail.From = new MailAddress("shankarganesh.mca@gmail.com"); mail.To.Add(new MailAddress("shankarganesh.mca@gmail.com")); mail.Subject = "Subject"; mail.Body = "This is Body"; mail.IsBodyHtml = true; mail.Priority = MailPriority.Normal; SmtpClient client = new SmtpClient(); client.Send(mail); } catch (SmtpException ex) { Response.Write(ex.InnerException); } }
can anyone find solution for this? -
When i try to send i caught as exception like below, System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. 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.SmtpReplyReader.ReadLine() 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) and mycode is
protected void Button1_Click(object sender, EventArgs e) { try { MailMessage mail = new MailMessage(); mail.From = new MailAddress("shankarganesh.mca@gmail.com"); mail.To.Add(new MailAddress("shankarganesh.mca@gmail.com")); mail.Subject = "Subject"; mail.Body = "This is Body"; mail.IsBodyHtml = true; mail.Priority = MailPriority.Normal; SmtpClient client = new SmtpClient(); client.Send(mail); } catch (SmtpException ex) { Response.Write(ex.InnerException); } }
can anyone find solution for this?try this code
MailMessage message = new MailMessage(strEmailFrom, ToEmail, Subject, Body);
message.IsBodyHtml = IsBodyHtml; SmtpClient emailClient = new SmtpClient(SMTPServer); System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential(SMTPUser, SMTPPassword); emailClient.UseDefaultCredentials = false; emailClient.Credentials = SMTPUserInfo; emailClient.Send(message);
Coding C# ExciteTemplate
-
When i try to send i caught as exception like below, System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. 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.SmtpReplyReader.ReadLine() 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) and mycode is
protected void Button1_Click(object sender, EventArgs e) { try { MailMessage mail = new MailMessage(); mail.From = new MailAddress("shankarganesh.mca@gmail.com"); mail.To.Add(new MailAddress("shankarganesh.mca@gmail.com")); mail.Subject = "Subject"; mail.Body = "This is Body"; mail.IsBodyHtml = true; mail.Priority = MailPriority.Normal; SmtpClient client = new SmtpClient(); client.Send(mail); } catch (SmtpException ex) { Response.Write(ex.InnerException); } }
can anyone find solution for this?Where has this been code been connected to an actual, live, mail server ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
When i try to send i caught as exception like below, System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. 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.SmtpReplyReader.ReadLine() 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) and mycode is
protected void Button1_Click(object sender, EventArgs e) { try { MailMessage mail = new MailMessage(); mail.From = new MailAddress("shankarganesh.mca@gmail.com"); mail.To.Add(new MailAddress("shankarganesh.mca@gmail.com")); mail.Subject = "Subject"; mail.Body = "This is Body"; mail.IsBodyHtml = true; mail.Priority = MailPriority.Normal; SmtpClient client = new SmtpClient(); client.Send(mail); } catch (SmtpException ex) { Response.Write(ex.InnerException); } }
can anyone find solution for this?You did not setup the Port
Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
-
When i try to send i caught as exception like below, System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. 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.SmtpReplyReader.ReadLine() 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) and mycode is
protected void Button1_Click(object sender, EventArgs e) { try { MailMessage mail = new MailMessage(); mail.From = new MailAddress("shankarganesh.mca@gmail.com"); mail.To.Add(new MailAddress("shankarganesh.mca@gmail.com")); mail.Subject = "Subject"; mail.Body = "This is Body"; mail.IsBodyHtml = true; mail.Priority = MailPriority.Normal; SmtpClient client = new SmtpClient(); client.Send(mail); } catch (SmtpException ex) { Response.Write(ex.InnerException); } }
can anyone find solution for this?Go Through this link Once,It might Help You.. I Have not Tried This... Send Email
Sundeep Ganiga When the only tool you have is a hammer, everything looks like a nail. Come Forth Yourself to Click "Good Answer" for any expected solution. Let us Support our C Project Programmers who provide solutions here.