C#验证邮件(获取服务器虚拟路径)

 string emailTitle = "欢迎加入课下自主学习社区平台";


//获取服务器的虚拟路径的方法(后面拼接自己的路径页面)
string str = String.Format("http://{0}{1}", HttpContext.Current.Request.Url.Authority, HttpContext.Current.Request.ApplicationPath) + "testMail/reEmail.aspx?key=123";


string emailBody = "您在“课下自主学习社区平台”中的注册信息已提交,请点击该链接进行注册验证!<br/>" + str + "<br/><br/>感谢您注册“课下自主学习社区平台”,祝您在该平台中体会到互动学习的乐趣!";

 

SendEmail("[email protected]", "[email protected]", emailTitle, emailBody, "danny__wj", "juewang!#7", "smtp.163.com");
   

你可能感兴趣的:(C#验证邮件(获取服务器虚拟路径))