mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -2,7 +2,7 @@
|
||||
<mj-head>
|
||||
<!-- ⬇ Don't forget to specifify an email subject! Use the HTML comment below ⬇ -->
|
||||
<mj-title>
|
||||
{{ Subject .Subject "{{ .InvitedBy }} has added you to the {{ .OrgName }} organization" }}
|
||||
{{ Subject .Subject .TemplateData "{{ .InvitedBy }} has added you to the {{ .OrgName }} organization" }}
|
||||
</mj-title>
|
||||
<mj-include path="./partials/layout/head.mjml" />
|
||||
</mj-head>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[[Subject .Subject "[[.InvitedBy]] has added you to the [[.OrgName]] organization"]]
|
||||
[[HiddenSubject .Subject "[[.InvitedBy]] has added you to the [[.OrgName]] organization"]]
|
||||
|
||||
You have been added to [[.OrgName]]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<mj-head>
|
||||
<!-- ⬇ Don't forget to specifify an email subject below! ⬇ -->
|
||||
<mj-title>
|
||||
{{ Subject .Subject "{{ .InvitedBy }} has invited you to join Grafana" }}
|
||||
{{ Subject .Subject .TemplateData "{{ .InvitedBy }} has invited you to join Grafana" }}
|
||||
</mj-title>
|
||||
<mj-include path="./partials/layout/head.mjml" />
|
||||
</mj-head>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[[Subject .Subject "[[.InvitedBy]] has invited you to join Grafana"]]
|
||||
[[HiddenSubject .Subject "[[.InvitedBy]] has invited you to join Grafana"]]
|
||||
|
||||
You're invited to join [[.OrgName]]
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<mj-head>
|
||||
<!-- ⬇ Don't forget to specifify an email subject below! ⬇ -->
|
||||
<mj-title>
|
||||
{{ Subject .Subject "{{ .Title }}" }}
|
||||
{{ Subject .Subject .TemplateData "{{ .Title }}" }}
|
||||
</mj-title>
|
||||
<mj-include path="./partials/layout/head.mjml" />
|
||||
<!-- Summary of the email contents, this will go in the email preview -->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[[Subject .Subject "[[.Title]]"]]
|
||||
[[HiddenSubject .Subject "[[.Title]]"]]
|
||||
|
||||
[[.Title]]
|
||||
----------------
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<mj-head>
|
||||
<!-- ⬇ Don't forget to specifify an email subject below! ⬇ -->
|
||||
<mj-title>
|
||||
{{ Subject .Subject "Reset your Grafana password - {{.Name}}" }}
|
||||
{{ Subject .Subject .TemplateData "Reset your Grafana password - {{.Name}}" }}
|
||||
</mj-title>
|
||||
<mj-include path="./partials/layout/head.mjml" />
|
||||
</mj-head>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[[Subject .Subject "Reset your Grafana password - [[.Name]]"]]
|
||||
[[HiddenSubject .Subject "Reset your Grafana password - [[.Name]]"]]
|
||||
|
||||
Hi [[.Name]],
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<mj-head>
|
||||
<!-- ⬇ Don't forget to specifify an email subject below! ⬇ -->
|
||||
<mj-title>
|
||||
{{ Subject .Subject "Welcome to Grafana, please complete your sign up!" }}
|
||||
{{ Subject .Subject .TemplateData "Welcome to Grafana, please complete your sign up!" }}
|
||||
</mj-title>
|
||||
<mj-include path="./partials/layout/head.mjml" />
|
||||
</mj-head>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[[Subject .Subject "Welcome to Grafana, please complete your sign up!"]]
|
||||
[[HiddenSubject .Subject "Welcome to Grafana, please complete your sign up!"]]
|
||||
|
||||
Complete the signup
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<mj-head>
|
||||
<!-- ⬇ Don't forget to specifify an email subject below! ⬇ -->
|
||||
<mj-title>
|
||||
{{ Subject .Subject "Welcome to Grafana" }}
|
||||
{{ Subject .Subject .TemplateData "Welcome to Grafana" }}
|
||||
</mj-title>
|
||||
<mj-include path="./partials/layout/head.mjml" />
|
||||
</mj-head>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[[Subject .Subject "Welcome to Grafana"]]
|
||||
[[HiddenSubject .Subject "Welcome to Grafana"]]
|
||||
|
||||
Hi [[.Name]],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user