A
akylitis
Hello:
Anyone have an opinion on the best way to formulate a dynamic HTML
email? Thus far I have figured out that the only way to "build" the
HTML prior to the email (I'm using System.Net.Mail) is to manually
build the HTML string in code or "screen scrape" a stream from a
WebRequest.
I've tried both ways and I'm torn. I hate building HTML through
strings; I'd rather create and manage an HTML file. However, the final
HTML needs to be dynamic enough to display data collected from a
"Contact Us" form. At the point of the email, the data is already
posted to the DB but I'm not sure if I want to hit the DB again if the
data is already part of the business object I already have created.
I think what I'm really looking for is a way to use an html template
somehow and "place" the data in the template, set the value to the
mail.body and be done. Any thoughts?
Tony
Anyone have an opinion on the best way to formulate a dynamic HTML
email? Thus far I have figured out that the only way to "build" the
HTML prior to the email (I'm using System.Net.Mail) is to manually
build the HTML string in code or "screen scrape" a stream from a
WebRequest.
I've tried both ways and I'm torn. I hate building HTML through
strings; I'd rather create and manage an HTML file. However, the final
HTML needs to be dynamic enough to display data collected from a
"Contact Us" form. At the point of the email, the data is already
posted to the DB but I'm not sure if I want to hit the DB again if the
data is already part of the business object I already have created.
I think what I'm really looking for is a way to use an html template
somehow and "place" the data in the template, set the value to the
mail.body and be done. Any thoughts?
Tony