feat: announcement email with one-click unsubscribe headers

This commit is contained in:
2026-09-11 13:34:14 +00:00
parent a901482e5d
commit f65174a368
7 changed files with 180 additions and 12 deletions
+9
View File
@@ -0,0 +1,9 @@
{{define "tone"}}accent{{end}}
{{define "category"}}{{.CategoryLabel}}{{end}}
{{define "pill"}}{{template "chip" (dict "label" .CategoryLabel "tone" "accent")}}{{end}}
{{define "title"}}{{.Subject}}{{end}}
{{define "body"}}
<div style="color:#e4ecf6;font-size:15px;line-height:1.6;">{{.BodyHTML}}</div>
<p style="margin:24px 0 0;color:#71879f;font-size:12px;line-height:1.6;"><a href="{{.UnsubscribeURL}}" style="color:#9fb3ca;">Unsubscribe from {{.CategoryLabel}}</a> &middot; <a href="{{.PreferencesURL}}" style="color:#9fb3ca;">Email preferences</a>{{if .PostalAddress}}<br>{{.PostalAddress}}{{end}}</p>
{{end}}
{{define "why"}}you have a Vantage account and are subscribed to {{.CategoryLabel}}. Account emails such as sign-in, licences and billing are sent whatever you choose here.{{end}}
+13
View File
@@ -0,0 +1,13 @@
{{define "subject"}}{{.Subject}}{{end}}
{{define "tone"}}accent{{end}}
{{define "category"}}{{.CategoryLabel}}{{end}}
{{define "pill"}}{{template "chip" (dict "label" .CategoryLabel "tone" "accent")}}{{end}}
{{define "title"}}{{.Subject}}{{end}}
{{define "body"}}
{{.BodyMarkdown}}
Unsubscribe from {{.CategoryLabel}}: {{.UnsubscribeURL}}
Email preferences: {{.PreferencesURL}}
{{if .PostalAddress}}{{.PostalAddress}}{{end}}
{{end}}
{{define "why"}}you have a Vantage account and are subscribed to {{.CategoryLabel}}. Account emails such as sign-in, licences and billing are sent whatever you choose here.{{end}}