How to send email from template using RazorEngine
<p>I am trying to use a <code>.cshtml</code> template to send an email with RazorEngine. The documentation on <a href="http://antaris.github.io/RazorEngine/" rel="noreferrer">their site</a> shows how to use it with a string containing the razor syntax. How would I go about using it by loading a <code>.cshtml</code> file instead?</p>

<p>This is what I have </p>

<pre><code>    string templatePath = "~/Templates/InitialApplicationBody.cshtml";
    var result = Engine.Razor.RunCompile(templatePath, "templateKey", null, viewModel);
</code></pre>