superlogin
superlogin copied to clipboard
Need more flexibility on the email template
Right now the only thing we can do through the config is to give the path of the template file.
Ideally I would like to add more generic data in the template based on my server setup, and then feed the result to superlogin. So could be nice to be able to give also a string (or bugger) as a template instead of only a file path.
I believe the template currently has access to the entire Express req
object. What kind of API would you suggest to add more options?
Basically I need to be able to set a specific domain for the reset url based on the environment (or any external data).
Which might differ from req.headers.host
In fact what would be very nice is to also be able to pass a string to config.emails.forgotPassword.template
.
This way the template could become more dynamic.
OK, that doesn't seem very difficult. Under mailer
in the config, should we create an option called templateLocals
which will be passed into each email template automatically?
Should be fine yes.