SmtpException: Unable to read data from the transport connection: net_io_connectionclosed
问题 I am using the SmtpClient library to send emails using the following: SmtpClient client = new SmtpClient(); client.Host = "hostname"; client.Port = 465; client.DeliveryMethod = SmtpDeliveryMethod.Network; client.UseDefaultCredentials = false; client.EnableSsl = true; client.Credentials = new NetworkCredential("User", "Pass); client.Send("from@hostname", "to@hostname", "Subject", "Body"); The code works fine in my test environment, but when I use production SMTP servers, the code fails with an