I have an issue with an mvc4 application in witch i would like to send a generated html page created with HTML + C#. The problem is that when i recieved the email i see my c# code like the exemple bellow: Recieved Email
But in the mail preview i can see the correct values like this: Mail Preview
So this is my EmailTemplate method:
<pre> public static async Task<string> EMailTemplate (string template) { var templateFilePath =HostingEnvironment.MapPath("~/Views/Home/") + template + ".cshtml"; StreamReader objstreamreaderfile = new StreamReader(templateFilePath); var body = await objstreamreaderfile.ReadToEndAsync(); objstreamreaderfile.Close(); return body; } </pre> Please if you have any idea how to convert my template to Html without inclouding my C# code.
Thanks,
