SMTP: Update email templates to include populated <title> tag (#61430)

* add .TemplateData property to data in order to populate template <title> tags with the compiled subject value

* update all templates

* re-enable integration test and update implementation to check changes

* chore: fmt

* add HiddenSubject template func and update text templates

* slight performance improvement, only execute subject template once

* update template I missed

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
This commit is contained in:
Michael Mandrus
2023-01-30 16:56:23 -05:00
committed by GitHub
co-authored by Gilles De Mey
parent a92c081a33
commit 8dab3bf36c
30 changed files with 107 additions and 70 deletions
+5
View File
@@ -33,4 +33,9 @@ func setDefaultTemplateData(cfg *setting.Cfg, data map[string]interface{}, u *us
if u != nil {
data["Name"] = u.NameOrFallback()
}
dataCopy := map[string]interface{}{}
for k, v := range data {
dataCopy[k] = v
}
data["TemplateData"] = dataCopy
}