What is a user-friendly solution to editing email templates with replacement variables?

Posted by Daniel Magliola on Programmers See other posts from Programmers or by Daniel Magliola
Published on 2012-07-03T09:15:10Z Indexed on 2012/07/03 15:24 UTC
Read the original article Hit count: 264

Filed under:
|

I'm working on a system where we rely a lot of "admins / managers" emailing users from the database. One of the key features is being able to email several people at the same time, with specific information relevant to each of them. Another key feature is to be able to hand-craft emails, because it tends to be be necessary to slightly modify them each time, but having a basic template saves a lot of time.

For this, we have the typical "templates" solution, where we have a template that looks kind of like this:

Hello {{recipient.full_name}},

Your application to {{activity.title}} has been accepted. 
You have requested to participate on dates {{application.dates}}, in role {{application.role}}
Blah blah blah

The problem we are having is obviously that (as we expected), managers don't get the whole "variables" idea, and they do things like overwriting them, which doesn't let them email more than one person at a time, assuming those are not going to get replaced and that the system is broken, or even inexplicable things like "Hello {{John}}".

The big problem is that this isn't relegated, as usual, to an "admin" section where only a few power users have access to editing the templates that are automatically send out, and they're expected to know what they are doing. Every user of the system gets exposed to this problem.

The obvious solution would be to replace the variables before showing this template for the user to edit, but that doesn't work when emailing several people.

This seems like a reasonably common problem, and we are kind of hoping that someone has already solved it.

Have you seen anywhere/created/can think of good solutions to this problem?

© Programmers or respective owner

Related posts about templates

Related posts about variables