We have several competng implementations of the idea of email templates, that is the text of an email saved to be sent out when someting happens.
First of course, are the built in, registration etc emails. These are usually hard coded in the tcl files or added as message keys.
Second is the bulk-mail package. These are saved for one time delivery and not reusable (although there isn't any reason a user interface for this could not be created).
Third is the dotlrn_member_email feature which powers the welcome message when a user is added to a community, and also powers the triggered emails in the dotlrn-ecommernce package when a user applies for a course, etc.
There are plenty of other times we have emails that need to have stuff replaced. Notifications is another place where the content of the email is predefined and just some variables are replaced.
The contacts package has the same idea.
So clearly we have a need to be able to define the text of an email, and allow variables to be replaced within the content, then send this email to one or more users.
Right now administrators cannot edit the content of notifications, and other built in messages. It would be nice to be able to do this.
The two most fully implemented versions of this that I am aware of are bulk mail and dotlrn_member_emails. (Contacts is probably similar but I haven't used it myself.)
These use two different techniques to replace variables within the content of the email
Bulk mail uses the format {varname} and dotlrn_member_emails uses the message key format %varname%.
So the basic proposal is to create a new table to store all these emails, along with includable forms to allow the management of these emails, then of course, updating all the existing code to use this feature.
Since the core can send email it probably makes sense to make this core code once its ready.
Does anyone have any feedback ideas, or can anyone see any problems with this proposal?