public static string FormatWithTemplate(string subject, string message) { return(string.IsNullOrEmpty(TemplateHTML) ? $"{subject} <br/> {message}" : TemplateHTML.Replace("[SUBJECT]", subject).Replace("[MESSAGE]", message)); }
/// <summary> /// Write in a placeholder variable into template. /// </summary> /// <param name="templateVar">Placeholder variable.</param> /// <param name="html">Html to write.</param> public void WriteFromVar(string templateVar, string html) { TemplateHTML = TemplateHTML.Replace(templateVar, html); }