这样试一试:把设置SMTP的那一句代码去掉,使用系统的默认设置,

解决方案 »

  1.   

    //不知道这个能不能对你有所帮助
    MailMessage mail = new MailMessage(); 
       mail.To = "[email protected]"; 
       mail.From = "[email protected]"; 
       mail.Subject = "this is a test email."; 
       mail.Body = "Some text goes here"; 
       mail.Attachments.Add (new MailAttachment("c:\\test.txt"));
       mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication 
       mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "tjq_tang"); //set your username here 
       mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "qqq"); //set your password here 
     
       SmtpMail.SmtpServer = "smtp.tom.com"; //your real server goes here 
       SmtpMail.Send( mail ); 
       MessageBox.Show("发送成功");