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("[email protected]", "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

解决方案 »

  1.   

    我也用过163的SMTP服务,不太好用,最好自己机器上配置一个SMTP
      

  2.   

    发邮件要用发件人的用户名和密码的吧,
    见意,jmail用着还行个人见解,共同学习
      

  3.   

    邮件服务器分为
    SMTP 和 ESMTP
    SMTP 不需要验证
    ESMTP 需要验证,现今大多数采用ESMTP所以你要先验证服务器
      

  4.   

    我自己配了个WEBEASYMAIL,现在可以发邮件了,可为什么附件的名字到收的人的邮箱时候附件的文件名保存不下来,总显示2(58.28KB),谢谢大家