using (MailMessage mailmessage = new MailMessage())
using (SmtpClient smtpclient = new SmtpClient("smtp.qq.com"))
{
//填补邮件信息
//mailmessage.To.Add("947806342@qq.com");
mailmessage.To.Add(diz);//可以有多个
mailmessage.Body = "您好"+Name+",您的密码设置为初始 密码为123456,登陆后可重新修改。";
mailmessage.From = new MailAddress("xxx@qq.com");
mailmessage.Subject = "银豪KTV";
smtpclient.Credentials = new System.Net.NetworkCredential("xxx@qq.com", "邮箱凭证");
smtpclient.Send(mailmessage);//发送