As a user of straightmail i want to have the possibility to start straightmail in a database enabled profile so that straightmail connects to a database where it can read and manage templates.
In end we would have 3 different templating possibillites:
- file based (via docker mount or similar)
- inline based (via rest call)
- database based (templates from database, identified by a slug or id)
It's important that the whole database dependencies won't get loaded if this profile isn't activated. It would be fine if it would be controllable by an environment/config variable.
As database solution i would suggest mongoDB since spring-data-mongo is really reliable.
The database based templates should be manageable by a special CRUD REST endpoint to be able to provide some frontend or api possibilities later. E.g.
A database template should also be taggable with string based tags. It should be possible to obtain a list of database templates by tags (plural) later on. E.g.
The REST Endpoint for sending emails should be moved from