The requirement is that in the application in which I work, I make all available letters editable.
The obvious solution is to save all messages in the database and use a text editor to edit messages.
However, I am wondering how to do this when it comes to placeholders in an email message.
Placeholders for the message must also be stored in the database. A message can contain many placeholders. Placeholder can be in many posts.
I could let the user select a placeholder from the list of placeholders when they insert it.
The e-mail message will need to specify placeholders, usually {0}, {1}, etc., but for display purposes this should be more user-friendly, such as $ WebsiteLink $. Some placeholders are straightforward, for example, a link to a site that changes only depending on the deployment, or the name of a registered user.
Other placeholders are more complex. They depend on receiving information from the database at a specific time, for example, on behalf of a selected group member. So for this placeholder, instead of storing some static text, I probably need to call a method or event to get this information.
I don’t understand how to do this. You can help?
I hope the specification is clear, let me know if not?
source
share