无法从传输连接中读取数据:net_io_connectionclosed。 [英] Unable to read data from the transport connection: net_io_connectionclosed.
本文介绍了无法从传输连接中读取数据:net_io_connectionclosed。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用asp.net c#代码发送电子邮件。我的网站托管在godaddy服务器上。它给出了这个错误:无法从传输连接中读取数据:net_io_connectionclosed。
I am trying to send email by using asp.net c# code. My webiste is hosted in godaddy server. It gives this error : Unable to read data from the transport connection: net_io_connectionclosed.
using System.Net.Mail;
using MailMessage = System.Net.Mail.MailMessage;
protected void but_forgot_Click(object sender, EventArgs e)
{
MailMessage mail = new MailMessage();
mail.To.Add(txt_email.Text);
mail.From = new MailAddress("no-reply@abc.com");
mail.Subject = "Recovery Mail";
mail.Body = "Hello " + name + ", your recovery password is given below:" + "\n\nEmail: " + email + "\n\nPassword: " + password;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtpout.asia.secureserver.net";
smtp.Credentials = new System.Net.NetworkCredential("no-reply@abc.com", "password");
smtp.EnableSsl = false;
smtp.Port = 25;
smtp.Send(mail);
}
推荐答案
参考 -
无法通过GoDaddy电子邮件SMTP获取电子邮件 [ ^ ] 。实现这个。
Refer -
Cannot get email to work with GoDaddy email SMTP[^]. Implement this.
Quote:
症状
使用GoDaddy SMTP服务器smptout.secureserver.net发生电子邮件错误,例如:发生邮件错误 - 异常=发送邮件失败。无法从传输连接中读取数据:net_io_connectionclosed。
原因
GoDaddy阻止来自大多数第三方托管服务提供商的电子邮件中继。
解决方案
为GoDaddy电子邮件服务器使用以下SMTP设置:
邮件服务器DNS = relay-hosting.secureserver.net
邮件服务器TCP端口= 25
使用GoDaddy SMTP服务器smptout.secureserver.net发生电子邮件错误,例如:发生邮件错误 - 异常=发送邮件失败。无法从传输连接中读取数据:net_io_connectionclosed。
原因
GoDaddy阻止来自大多数第三方托管服务提供商的电子邮件中继。
解决方案
为GoDaddy电子邮件服务器使用以下SMTP设置:
邮件服务器DNS = relay-hosting.secureserver.net
邮件服务器TCP端口= 25
Symptoms
Using GoDaddy SMTP server smptout.secureserver.net email errors occur such as: Mail Error occurred - Exception=Failure sending mail. Unable to read data from the transport connection: net_io_connectionclosed.
Cause
GoDaddy is blocking email relay from most 3rd party hosting providers.
Solution
Use the following SMTP settings for the GoDaddy email server:
Mail Server DNS = relay-hosting.secureserver.net
Mail Server TCP Port = 25
Using GoDaddy SMTP server smptout.secureserver.net email errors occur such as: Mail Error occurred - Exception=Failure sending mail. Unable to read data from the transport connection: net_io_connectionclosed.
Cause
GoDaddy is blocking email relay from most 3rd party hosting providers.
Solution
Use the following SMTP settings for the GoDaddy email server:
Mail Server DNS = relay-hosting.secureserver.net
Mail Server TCP Port = 25
如果赢了'工作,我想你必须与GoDaddy支持团队核实。
If this won't work, I guess you have to check with the GoDaddy Support team.
试试这个..
Try This..
SmtpClient LocalClient = new SmtpClient();
MailMessage Mail = new MailMessage();
Mail.To.Add("ToEmail");
Mail.From = new MailAddress("fromEmail");
Mail.Body = "Test Message";
Mail.Subject = "Mail Local";
// LocalClient.Port = 25;
// LocalClient.Host = "127.0.0.1";
LocalClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
LocalClient.Credentials = new NetworkCredential("fromEmail", "Password");
LocalClient.Send(Mail);
这篇关于无法从传输连接中读取数据:net_io_connectionclosed。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文