我正在尝试使用goDaddy smtp服务器设置邮件功能,Go daddy支持在这里也不是很有用。
我试过这些服务器:
relay-hosting.secureserver.net -Errors-无法连接\
smtpout.secureserver.net -Errors - 无法从传输连接中读取数据:net_io_connectionclosed
这就是goDaddy所说的:
这是我的代码段:
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();
这是我的错误页面
帮帮我们。
答案 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)
终于搞定了。要注意两件事
client.Timeout = 10000;//was 1000 initialy