update template location
parent
41326e1edb
commit
1e982b18fb
|
|
@ -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() ?? "");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue