コード例 #1
0
        public static string getContentEmail(string callbackUrl, string email)
        {
            Account account = new Account();

            account.Email = email;
            var name = AccountBLL.Account_GetEmployee(account).FirstName + " " + AccountBLL.Account_GetEmployee(account).LastName;
            // StreamReader sr = File.OpenText(Server.MapPath("~/TemplateEmail/EmailCustomer"));
            string strContents = System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath(@"~/Views/Forgetpassword.html"));

            //strContents = strContents.Replace("{Date}", calendar.Date.ToString("MM/dd/yyyy HH:mm"));
            strContents = strContents.Replace("{email}", email);
            strContents = strContents.Replace("{Name}", name);
            strContents = strContents.Replace("{rspass}", callbackUrl);
            //sr.Close();
            return(strContents);
        }