update template location

master
dan 2019-07-24 22:55:34 -06:00
parent 41326e1edb
commit 1e982b18fb
1 changed files with 2 additions and 2 deletions

View File

@ -16,8 +16,8 @@ namespace OFBButte.Application.Email
public void SetBodyFromTemplate(bool isTest = true) public void SetBodyFromTemplate(bool isTest = true)
{ {
string baseHtml = System.IO.File.ReadAllText($@"Email\Templates\base.html"); string baseHtml = System.IO.File.ReadAllText($@"Email/Templates/base.html");
string template = System.IO.File.ReadAllText($@"Email\Templates\{TemplateName}.html"); string template = System.IO.File.ReadAllText($@"Email/Templates/{TemplateName}.html");
baseHtml = baseHtml.Replace("{{TEST}}", isTest ? "THIS IS A TEST" : ""); baseHtml = baseHtml.Replace("{{TEST}}", isTest ? "THIS IS A TEST" : "");
template = baseHtml.Replace("{{CONTENT}}", template); template = baseHtml.Replace("{{CONTENT}}", template);
var props = GetType().GetProperties(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public).ToDictionary(p => p.Name, p => p.GetValue(this)?.ToString() ?? ""); var props = GetType().GetProperties(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public).ToDictionary(p => p.Name, p => p.GetValue(this)?.ToString() ?? "");