【问题标题】:goDaddy SMTP-Unable to read data from the transport connection: net_io_connectionclosedgoDaddy SMTP-无法从传输连接中读取数据:net_io_connectionclosed
【发布时间】:2015-03-02 01:07:37
【问题描述】:

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

我已经尝试过这些服务器:

relay-hosting.secureserver.net -错误 - 无法连接\

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

goDaddy 是这样说的:

这是我的代码 sn-p:

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();

这是错误页面

帮帮我。

【问题讨论】:

    标签: c# email smtp


    【解决方案1】:

    终于搞定了。有两点需要注意

    1. 配置了“中继”的电子邮件只能以这种方式工作,如下图所示。
    2. 需要增加超时时间。
    client.Timeout = 10000;//was 1000 initialy
    

    【讨论】:

      【解决方案2】:

      问题解决后,您可以使用端口号: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();
      

      编码愉快... :-)

      【讨论】:

      • 这在欧洲对我有用 - smtpout.europe.secureserver.net 在文档中没有说明端口 - 3535?
      • +1,你只需要增加Timout:client.Timeout = 10000;
      猜你喜欢
      • 1970-01-01
      • 2016-02-21
      • 2013-12-12
      • 2013-07-04
      • 1970-01-01
      • 2022-08-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多