/// <summary>
/// 发送文本邮件简单例子
/// 如发送者使用163或126邮箱,smtp处必须加上sc.Credentials = new System.Net.NetworkCredential("发送者用户名", "密码");
///
/// </summary>
private void SendMessage()
{
MailMessage mm = new MailMessage("发送者邮箱", "目标邮箱");
mm.Subject = "邮件标题";
mm.Body = "请接受,不要拒绝";
mm.IsBodyHtml = false;
SmtpClient sc = new SmtpClient("smtp.163.com");//smtp地址,缺省端口25
sc.Credentials = new System.Net.NetworkCredential("发送者用户名", "密码");//使用sohu之类的邮箱发送可以不加此句
sc.Send(mm);
}