Rendering HTML content with @Html.Raw in Razor Mail Template
问题 Using Razor page as Mail Template I am trying to display the content of the mail (Html Content) using @Html.Raw(Model.Content) . Anytime I run the code I get this error: html does not exist in current context . I tried this @Html.Raw("<strong>Bold!</strong>") on another razor page to validate RazorEngine is installed and it displayed perfectly well with no error. 回答1: When doing e-mails, I use the RazorEngineService in RazorEngine.Templating, e.g. in my case, it looks like this: using