How to fix error while sending email from windows from?

SIC Team 0 Reputation points
2025-01-23T10:36:57.5933333+00:00

System.Net.Mail.SmtpException: Failure sending mail. ---> 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.SmtpConnection.GetConnection(ServicePoint servicePoint)

at System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint)

at System.Net.Mail.SmtpClient.GetConnection()

at System.Net.Mail.SmtpClient.Send(MailMessage message)

--- End of inner exception stack trace ---

at System.Net.Mail.SmtpClient.Send(MailMessage message)

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,920 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.