简体   繁体   中英

goDaddy SMTP-Unable to read data from the transport connection: net_io_connectionclosed

I am trying to set up mail functionality using goDaddy smtp servers,Go daddy support is also not very useful here.

I have tried these servers:

relay-hosting.secureserver.net -Errors-Unable to connect\\

smtpout.secureserver.net -Errors-Unable to read data from the transport connection: net_io_connectionclosed

This is what goDaddy says:

在此处输入图片说明

This is my code snippet:

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

and this is the error page am getting

在此处输入图片说明在此处输入图片说明

Help me out guys.

You can use port no : 3535 and EnableSSl:false after that is problem is resolved...

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

Happy coding... :-)

Finally got it working.Two things to note

  1. The emails configured with "Relays" are only working this way as depicted below. 在此处输入图片说明
  2. The Timeout needs to be increased.
client.Timeout = 10000;//was 1000 initialy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM