private static string GetPlainTextMessage(KidsInformationEmailModel reminder) { var message = File.ReadAllText(HostingEnvironment.MapPath("~/PlainTextEmail.txt")); message = message.Replace("{vchildname}", reminder.KName); message = message.Replace("{vparentname}", reminder.ParentsName); var dob = new DateTime(DateTime.Now.Year, reminder.MonthofBirth, reminder.DayofBirth); message = message.Replace("{vbirthdate}", dob.ToString("dd-MMM")); return(message); }
private static string GetHTMLMessageBody(KidsInformationEmailModel remainder) { var message = File.ReadAllText(HostingEnvironment.MapPath("~/emailtemplate.html")); message = message.Replace("vchildname", remainder.KName); message = message.Replace("vparentname", remainder.ParentsName); var dob = new DateTime(DateTime.Now.Year, remainder.MonthofBirth, remainder.DayofBirth); message = message.Replace("vbirthdate", dob.ToString("dd-MMM")); return(message); }