I'm using RazorEngine to generate an email with a template.
The issue I'm having is I cannot add a line break in the email body.
var model = new EmailModel
{
Destination = "anon@gmail.com",
Subject = "Some Subject",
Body = "Hello <br> Break <br> it <br> up"
};
var service = TemplateManager.RazorService;
var htmlBody = service.RunCompile("EmailTemplate.cshtml", model.GetType(), model);
await EmailService.SendEmail(model.Destination, model.Subject, htmlBody);
I tried doing the following in my Template:
@Html.Raw(Model.Body)
But it still won't decode the html, any ideas?