读书人

帮小弟我看看这个错误

发布时间: 2011-12-27 22:22:55 作者: rapoo

高手救命,帮我看看这个异常
MailMessage Message = new MailMessage();
Message.To.Add(new MailAddress(this.TextBox1.Text));
Message.Subject = this.TextBox2.Text;
Message.Body = this.TextBox3.Text;
Message.From = new MailAddress(this.TextBox4.Text);
SmtpClient smtpClient = new SmtpClient( "smtp.163.com ");
//smtpClient.Credentials = new NetworkCredential( "jaykoby@163.com ", "8836652 ");
smtpClient.UseDefaultCredentials = false;
smtpClient.Send(Message);

异常发生在smtpClient.Send(Message);
Mailbox name not allowed. The server response was: authentication is required,smtp5,wKjRELArpABDDqdGOw+ZAg==.42102S2 1185353283

[解决办法]
我也用过163的SMTP服务,不太好用,最好自己机器上配置一个SMTP
[解决办法]
邮件服务器分为
SMTP 和 ESMTP
SMTP 不需要验证
ESMTP 需要验证,现今大多数采用ESMTP

所以你要先验证服务器

读书人网 >asp.net

热点推荐