public static void SendMail(MailInfor MI) { MI.Host = Tools.MailGetHost(MI.MailFrom); MailMessage mm = new MailMessage(MI.MailFrom, MI.MailTo); mm.BodyEncoding = System.Text.Encoding.UTF8; mm.To.Add("*****@*****.**"); mm.SubjectEncoding = System.Text.Encoding.UTF8; mm.Subject = MI.Title; mm.Body = MI.Msg; mm.Priority = System.Net.Mail.MailPriority.High; mm.IsBodyHtml = true; SmtpClient sc = new SmtpClient(MI.Host); sc.Credentials = new System.Net.NetworkCredential(MI.MailFrom, MI.Password); sc.Send(mm); }
public SendMail(MailInfor Mi) { MI = Mi; }