/// <summary>
/// 发送邮件
/// </summary>
/// <param name="toMail"></param>
/// <param name="subject"></param>
/// <param name="body"></param>
public static void SendMail(string toMail,string subject,string body){
MailMessage mail = new MailMessage();
mail.From = "jinchuanshu@163.com";
mail.To = toMail;
mail.Subject = subject;
mail.Body = body;
mail.BodyFormat = MailFormat.Text;
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",1);
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername","jinchuanshu");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword","3668466");
SmtpMail.SmtpServer = "smtp.163.com";
SmtpMail.Send(mail);
}
/// 发送邮件
/// </summary>
/// <param name="toMail"></param>
/// <param name="subject"></param>
/// <param name="body"></param>
public static void SendMail(string toMail,string subject,string body){
MailMessage mail = new MailMessage();
mail.From = "jinchuanshu@163.com";
mail.To = toMail;
mail.Subject = subject;
mail.Body = body;
mail.BodyFormat = MailFormat.Text;
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",1);
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername","jinchuanshu");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword","3668466");
SmtpMail.SmtpServer = "smtp.163.com";
SmtpMail.Send(mail);
}