正则表达式:验证是否为邮箱地址
//正则表达式验证邮箱格式 Regex regex = new Regex(@"^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"); //实例化电子邮件类 //添加收件人 string[] Receive = Receivelist.Split(';'); if (Receive.Length > 0) { for (int i = 0; i < Receive.Length; i++) { //验证邮箱是否为空,以及其格式是否正确 if (Receive[i] != "") { if (regex.IsMatch(Receive[i])) { mmsg.To.Add(Receive[i]); } } } }