Implement email template generation

Variables are surrounded by {}, and initial (default) templates are
generated on demand from the plaintext version of emails. The custom
emails are intended to only be used if the user actually changes them,
as they lose the features of the default ones, such as tables.
This commit is contained in:
Harvey Tindall
2021-02-19 21:38:20 +00:00
parent 5c87d109a3
commit eb406ef951
23 changed files with 322 additions and 106 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ func pwrMonitor(app *appContext, watcher *fsnotify.Watcher) {
return
}
address = addr.(string)
msg, err := app.email.constructReset(pwr, app)
msg, err := app.email.constructReset(pwr, app, false)
if err != nil {
app.err.Printf("Failed to construct password reset email for %s", pwr.Username)
app.debug.Printf("%s: Error: %s", pwr.Username, err)