goDaddy SMTP-无法从传输连接中读取数据:net_io_connectionclosed

时间:2015-01-04 07:48:49

标签: c# email smtp

我正在尝试使用goDaddy smtp服务器设置邮件功能,Go daddy支持在这里也不是很有用。

我试过这些服务器:

relay-hosting.secureserver.net -Errors-无法连接\

smtpout.secureserver.net -Errors - 无法从传输连接中读取数据:net_io_connectionclosed

这就是goDaddy所说的:

enter image description here

这是我的代码段:

MailMessage mail = new MailMessage("signup@xxx-xxx.com", to);
SmtpClient client = new SmtpClient();
client.Host = "smtpout.asia.secureserver.net";
//Tried "relay-hosting.secureserver.net" -Errors-Unable to connect
//Tried "smtpout.secureserver.net" -Errors-Unable to read data from the transport connection: net_io_connectionclosed
client.Port = 25;
//Tried 80, 3535, 25, 465 (SSL)
client.UseDefaultCredentials = false;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.EnableSsl = false;
client.ServicePoint.MaxIdleTime = 1;
client.Timeout = 1000;
client.Credentials = new NetworkCredential("signup@xxx-xxx.com", "xxx-xxx");
mail.IsBodyHtml = true;
mail.Subject = "xxx-xxx.com Account Activation";

mail.Body = SomeBigHTMLstring;
client.Send(mail);
mail.Dispose();

这是我的错误页面

enter image description here enter image description here

帮帮我们。

2 个答案:

答案 0 :(得分:6)

您可以使用端口号:3535和EnableSSl:false,之后问题已解决......

MailMessage mail = new MailMessage("signup@xxx-xxx.com", to);
SmtpClient client = new SmtpClient();
client.Host = "smtpout.asia.secureserver.net";

// Tried "relay-hosting.secureserver.net" -Errors-Unable to connect
// Tried "smtpout.secureserver.net" -Errors-Unable to read data from
// the transport connection: net_io_connectionclosed

client.Port = 3535;  //Tried 80, 3535, 25, 465 (SSL)
client.UseDefaultCredentials = false;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.EnableSsl = false;
client.ServicePoint.MaxIdleTime = 1;
client.Timeout = 1000;
client.Credentials = new NetworkCredential("signup@xxx-xxx.com", "xxx-xxx");
mail.IsBodyHtml = true;
mail.Subject = "xxx-xxx.com Account Activation";
mail.Body = SomeBigHTMLstring;
client.Send(mail);
mail.Dispose();

快乐编码......: - )

答案 1 :(得分:0)

终于搞定了。要注意两件事

  1. 使用“Relays”配置的电子邮件仅以此方式工作,如下所示。 enter image description here
  2. 需要增加超时时间。
  3. client.Timeout = 10000;//was 1000 initialy