The client's current application has a an email functionality that sends out emails using a predefined HTML template. The application performs a Replace
on certain identified meta data elements like FName, LNAme.
They now want to redo this feature and allow for vendors to provide the HTML template that we would use and generate the full HTML body with right data from a Model
I looked at Razor and looks promising, but came across this SO article that informs of security risk to doing this as malicious code can be executed.
Are there any alternative to using Razor engine to generate HTML emails using a .cshtml
file and supplying a Model
?
I have used Velocity template before and not sure if NVelocity is still active and if it allows for conditional blocks to be placed in, Razor from read up allowed for conditional statements and would generate the HTML based on the evaluation of the condition.
Also would need the ability to send attachments and this is not on ASP.NET MVC project but ASP.NET on Framework 4