//下面开始写SendEmail函数 public void SendEmail(string Emailshoujian, string Emailbiaoti, string Emailzhengwen, MailAddress EmailFrom) { try { //创建发送邮箱,并获取发件人地址,收件人地址,以及邮件标题与正文 MailMessage msg = new MailMessage(); //创建一个MailMessage的类,用来发送邮件 msg.To.Add(Email