private void SendEmail(String sender, String TransmitName, String Receiver, String subject, String Content)
{
MailMessage Mail = new MailMessage();
Mail.From = new MailAddress(sender);//发送人
Mail.To.Add(new MailAddress(Receiver));//接收人
Mail.IsBodyHtml = true;
Mail.Subject = subject;
Mail.IsBodyHtml = true;
Mail.Body = Content;
SmtpClient sc = new SmtpClient();
string EmailServer = System.Configuration.ConfigurationManager.AppSettings["EmailServer"];//服务器
sc.Host = EmailServer;
sc.UseDefaultCredentials = false;
string pwdEmail = System.Configuration.ConfigurationManager.AppSettings["pwdEmail"];//密码
sc.Credentials = new NetworkCredential(TransmitName, pwdEmail);
sc.DeliveryMethod = SmtpDeliveryMethod.Network;
sc.Send(Mail);
}