public static Email WithTemplateBody(this Email email, string templateName, IDictionary <string, string> placeHolderValues = null, bool isHtml = true) { var body = new TemplateBody() { TemplateName = templateName, IsHtml = isHtml }; if (placeHolderValues != null) { foreach (var key in placeHolderValues.Keys) { body[key] = placeHolderValues[key]; } } email.Body = body; return(email); }
public static Email WithTemplateBody(this Email email, string templateName, IDictionary<string, string> placeHolderValues = null, bool isHtml = true) { var body = new TemplateBody() { TemplateName = templateName, IsHtml = isHtml }; if (placeHolderValues != null) { foreach (var key in placeHolderValues.Keys) body[key] = placeHolderValues[key]; } email.Body = body; return email; }