收不會,發的話可以參考下面代碼試試記得先要在參考裡面引用System.web private void SendMail()
{
System.Web.Mail.MailMessage mailmsg=new System.Web.Mail.MailMessage();
mailmsg.From = this.txtSender.Text.Trim();
mailmsg.To   = this.txtReceiver.Text.Trim();
mailmsg.Body = this.txtMainText.Text.Trim() + "\r\n\r\n" + DateTime.Now.ToString();
mailmsg.Subject = this.txtSubject.Text.Trim();
mailmsg.Attachments.Add(new System.Web.Mail.MailAttachment(@"e:\test\中文.txt"));
mailmsg.Attachments.Add(new System.Web.Mail.MailAttachment(@"e:\test\english.doc"));
System.Web.Mail.SmtpMail.Send(mailmsg);
}

解决方案 »

  1.   

    http://community.csdn.net/Expert/topic/3284/3284408.xml?temp=.7284967
      

  2.   

    关键是要通过代理来实现收发mail,
    请问这如何写代码?
      

  3.   

    一楼的兄弟,这段代码的确可用,但要求SMTP服务器不要身份验证,不能,肯定通不过,
      

  4.   

    而且我觉得MailMessage问题比较多!不知哪位高手有通过代理来收发邮件的代码?
    不甚感激!
      

  5.   

    看这里
    http://www.systemwebmail.com/default.aspx