I have a html file that is an email template. In my Azure function I want to read the file in with 'HtmlDocument', manipulate it, then send it out as an email to members.
How do I read the file 'hero.html' from my Azure Function app? And then once I publish it to Azure will I need to change the way the file is read?
FYI - doc.Load accepts a string, file path and other parameters
Here is what I tried and a pic of my project.
//var emailBodyText = File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Templates", "hero.html"));
var mappedPath = Path.GetFullPath("hero.html");
var doc = new HtmlDocument();
doc.Load(mappedPath);