//不知道这个能不能对你有所帮助
MailMessage mail = new MailMessage();
mail.To = "tjq_tang@hotmail.com";
mail.From = "tjq_tang@tom.com";
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("发送成功");