日期:2014-05-17 浏览次数:20596 次
MailMessage m = new MailMessage();
m.From = new MailAddress(localMail, localName);
m.To.Add(TO);
m.Subject = SUBJECT;
m.Body = BODY;
m.BodyEncoding = System.Text.Encoding.UTF8;
m.IsBodyHtml = bIsHtml;
m.ReplyTo = new MailAddress(localMail);
m.Priority = MailPriority.High;
SmtpClient smtp = new SmtpClient("smtp.163.com");
smtp.Credentials = new NetworkCredential("account", "password");
smtp.EnableSsl = true;
smtp.Send(m);