.Net 2.0下一段发邮件的程序.
System.Net.Mail.SmtpClient smtpClient = new SmtpClient("smtp.126.com");
smtpClient.UseDefaultCredentials = false;
smtpClient.Credentials = new System.Net.NetworkCredential("yongkai", "password");
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
MailMessage message = new MailMessage("yongkai@126.com", "yongkai@163.com"); message.Subject = "Test Subject";
message.Body = "Test Body";
smtpClient.Send(message);