亲爱的" + username + ",您好:
你的陪学.Pexue登录密码是:" + userpass + "
----------------------------------------------------------------------------------" + "
此邮件为系统所发,请勿回复。
http://www.pexue.com/
"; msg.BodyEncoding = System.Text.Encoding.UTF8;//邮件内容编码 msg.IsBodyHtml = true;//是否是HTML邮件 msg.Priority = MailPriority.High;//邮件优先级 SmtpClient client = new SmtpClient(); client.Credentials = new System.Net.NetworkCredential(smodel.Email, smodel.password); //注册的邮箱和密码 client.Host = smodel.xieyi; object userState = msg; try { client.Send(msg); } catch (Exception ex) { throw ex; } context.Response.Write("success"); } else { context.Response.Write("no"); } } public bool IsReusable { get { return false; } } } }