private EmailMessage GetMessage <T>([NotNull] string template, T model, string subject, string to, string name = "") { var html = _razorEngine.RenderAsync(template, model).Result; return(new EmailMessage() { Body = html, AsHtml = true, Subject = subject, From = $"{Settings.Information.ContactName} {Settings.Information.ContactEmail}", To = to }); }