Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Templates

Status
Not open for further replies.

transparent

Programmer
Sep 15, 2001
333
GB
I am about to add a newsletter system to my website.

Emails are also generated through out the site.

I want to update this so that the emails use templates so that the format of the emails can be easily controlled and edited.

Does anybody know of any existing templating systems?

If I cant find one iwas going to implement it in the following manner:

1) Template class loads the template txt file
2) Parses it for placeholders i.e. <name> or <address>
3) The Template object will then populate an internal hashtable collection with these placeholder keys.
4) The developer can then populate fill the collection key by key
5) The .Generate method then replaces each placeholder in the template with the passed value. It then returns the populated template.


Does this seem like a good approach. What other functionality should I provide?
 
Why not use an xml file, then just have an XSL stylesheet to transform it?

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top