feat(email): every email Minstrel sends uses one layout (#8150)

The password reset, the new-music and activity summaries and the SMTP
test message each drew their own page; the test message had no layout
at all. They now share internal/mailer's layout: the Minstrel name at
the top, the email's heading and message on a card in the design
system's dark theme, and a footer saying which server sent it and why,
signed "— Minstrel", with the notification-settings link on the
summaries. A plain-text body in the same frame goes alongside.

An email supplies only its content templates and a Frame (heading,
server, reason). Links, buttons and quiet text take named styles from
the layout ({{style "link"}}), so colours change in one place; an
unknown style name fails the render. The SMTP test message is a
template now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 10:27:16 -05:00
co-authored by Claude Opus 5.5
parent a18d5aaa11
commit bae3421057
14 changed files with 331 additions and 113 deletions
+6 -3
View File
@@ -120,9 +120,12 @@ func (h *handlers) handleTestSMTPConfig(w http.ResponseWriter, r *http.Request)
defer cancel() defer cancel()
sender := mailer.NewSMTPSender(h.pool, h.logger) sender := mailer.NewSMTPSender(h.pool, h.logger)
textBody := "This is a test message from your Minstrel server.\n\nIf you got this, your SMTP config is working.\n\n— Minstrel" textBody, htmlBody, err := mailer.RenderSMTPTestEmail(h.netSettings.PublicURL())
htmlBody := "<p>This is a test message from your Minstrel server.</p><p>If you got this, your SMTP config is working.</p><p>— Minstrel</p>" if err != nil {
if err := sender.Send(ctx, *caller.Email, "Minstrel SMTP test", textBody, htmlBody); err != nil { writeErrWithLog(w, h.logger, "admin smtp: render test email failed", apierror.Internal(err))
return
}
if err := sender.Send(ctx, *caller.Email, mailer.SMTPTestSubject, textBody, htmlBody); err != nil {
if errors.Is(err, mailer.ErrNotConfigured) { if errors.Is(err, mailer.ErrNotConfigured) {
writeErr(w, apierror.BadRequest("not_configured", writeErr(w, apierror.BadRequest("not_configured",
"SMTP is not enabled or required fields are empty")) "SMTP is not enabled or required fields are empty"))
+1
View File
@@ -117,6 +117,7 @@ func (h *handlers) sendResetEmail(ctx context.Context, user dbq.User) error {
Username: user.Username, Username: user.Username,
ResetURL: resetURL, ResetURL: resetURL,
ExpiryHours: int(resetTokenTTL.Hours()), ExpiryHours: int(resetTokenTTL.Hours()),
Server: h.netSettings.PublicURL(),
}) })
if err != nil { if err != nil {
return err return err
+147
View File
@@ -0,0 +1,147 @@
package mailer
import (
"bytes"
"embed"
"fmt"
htmltemplate "html/template"
"io/fs"
"strings"
texttemplate "text/template"
)
// Every email Minstrel sends is drawn by one layout: the Minstrel name at the
// top, the email's heading and message on a card, and a footer saying which
// server sent it and why. An email supplies only its content, as a text
// template and an HTML template, plus a Frame; Render puts the content in the
// frame. A plain-text body goes out beside the HTML for clients that won't
// show HTML. Colours and type come from the Minstrel
// design system's dark theme, the app's own look, so an email reads as part
// of the same product on every client.
//go:embed templates/layout.html templates/layout.txt
var layoutFS embed.FS
var (
layoutText = texttemplate.Must(texttemplate.ParseFS(layoutFS, "templates/layout.txt"))
layoutHTML = htmltemplate.Must(htmltemplate.New("layout.html").Funcs(htmltemplate.FuncMap{"style": style}).
ParseFS(layoutFS, "templates/layout.html"))
)
// The Minstrel design system's values, as an email client needs them: inline,
// and with web fonts named first but never required.
const (
colourPage = "#14171A" // --fs-surface-page
colourCard = "#1E2228" // --fs-surface-raised
colourBorder = "#3F4651" // --fs-border-color
colourText = "#E8E4D8" // --fs-text-primary
colourSecondary = "#C2BFB4" // --fs-text-secondary
colourTertiary = "#9C9A92" // --fs-text-tertiary
colourLink = "#A1AEA0" // --fs-accent-fg: the accent, readable as text on a dark card
colourAction = "#4A5D3F" // --fs-action-primary
colourOnAction = "#E8E4D8" // --fs-text-on-action
fontBody = "'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif"
fontDisplay = "'Fraunces', Georgia, 'Times New Roman', serif"
fontMono = "'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace"
)
// styles are the named inline styles an email's HTML content uses, written
// `style="{{style "link"}}"`, so every email's links, buttons and quiet text
// look alike and change in one place.
var styles = map[string]string{
"page": "margin:0; padding:0; background:" + colourPage + ";",
"wrap": "background:" + colourPage + ";",
"brand": "padding:0 4px 16px; font-family:" + fontDisplay + "; font-size:22px; font-weight:500; color:" + colourText + ";",
"heading": "margin:0 0 20px; font-family:" + fontDisplay + "; font-size:20px; font-weight:500; line-height:1.3; color:" + colourText + ";",
"card": "background:" + colourCard + "; border:1px solid " + colourBorder + "; border-radius:12px; padding:28px; font-family:" + fontBody + "; font-size:15px; line-height:1.55; color:" + colourText + ";",
"footer": "padding:16px 4px 0; font-family:" + fontBody + "; font-size:12px; line-height:1.5; color:" + colourTertiary + ";",
"p": "margin:0 0 16px;",
"link": "color:" + colourLink + "; text-decoration:underline;",
"quiet": "color:" + colourSecondary + "; font-size:14px;",
"faint": "color:" + colourTertiary + ";",
"group": "margin:20px 0 4px; font-weight:600; color:" + colourText + ";",
"list": "margin:0 0 8px; padding-left:20px;",
"item": "margin:2px 0;",
"button": "display:inline-block; padding:12px 24px; background:" + colourAction + "; color:" + colourOnAction + "; text-decoration:none; border-radius:8px; font-weight:500;",
"code": "font-family:" + fontMono + "; font-size:13px; word-break:break-all; color:" + colourSecondary + ";",
}
// style returns a named style for an inline style attribute. An unknown name
// fails the render, so a typo shows in the email's test, not in an inbox.
func style(name string) (htmltemplate.CSS, error) {
s, ok := styles[name]
if !ok {
return "", fmt.Errorf("mailer: no email style %q", name)
}
return htmltemplate.CSS(s), nil //nolint:gosec // fixed strings from the table above, never user input
}
// Frame is what the layout says around an email's content.
type Frame struct {
// Heading is the line at the top of the card, saying what the email is.
Heading string
// Server is the server's public address, named in the footer as the
// sender; empty when none is set, and the footer says "your Minstrel
// server" instead.
Server string
// Reason finishes the footer's "…because": why this person got this
// email, in a clause ("you asked to reset your password").
Reason string
// NotificationSettings adds where to choose which notifications are
// emailed: a link under Server when it is set, else where to find it in
// the app.
NotificationSettings bool
}
// SettingsURL is the notification settings page under Server, or "".
func (f Frame) SettingsURL() string {
if f.Server == "" {
return ""
}
return strings.TrimRight(f.Server, "/") + "/settings/notifications"
}
// ServerName is how the footer names the sender.
func (f Frame) ServerName() string {
if f.Server == "" {
return "your Minstrel server"
}
return "the Minstrel server at " + strings.TrimRight(f.Server, "/")
}
type layoutVars struct {
Content any
Frame Frame
}
// Render returns an email's text and HTML bodies: the content templates
// textName and htmlName from content, executed with vars, inside the shared
// layout, framed by frame. HTML content styles its elements with
// {{style "name"}}.
func Render(content fs.FS, textName, htmlName string, vars any, frame Frame) (string, string, error) {
textSrc, err := fs.ReadFile(content, textName)
if err != nil {
return "", "", fmt.Errorf("mailer: read %s: %w", textName, err)
}
htmlSrc, err := fs.ReadFile(content, htmlName)
if err != nil {
return "", "", fmt.Errorf("mailer: read %s: %w", htmlName, err)
}
textTpl := texttemplate.Must(layoutText.Clone())
if _, err := textTpl.New("content").Parse(string(textSrc)); err != nil {
return "", "", fmt.Errorf("mailer: parse %s: %w", textName, err)
}
htmlTpl := htmltemplate.Must(layoutHTML.Clone())
if _, err := htmlTpl.New("content").Parse(string(htmlSrc)); err != nil {
return "", "", fmt.Errorf("mailer: parse %s: %w", htmlName, err)
}
lv := layoutVars{Content: vars, Frame: frame}
var textBuf, htmlBuf bytes.Buffer
if err := textTpl.ExecuteTemplate(&textBuf, "layout.txt", lv); err != nil {
return "", "", fmt.Errorf("mailer: render %s: %w", textName, err)
}
if err := htmlTpl.ExecuteTemplate(&htmlBuf, "layout.html", lv); err != nil {
return "", "", fmt.Errorf("mailer: render %s: %w", htmlName, err)
}
return textBuf.String(), htmlBuf.String(), nil
}
+65
View File
@@ -0,0 +1,65 @@
package mailer
import (
"strings"
"testing"
"testing/fstest"
)
// Every email Minstrel sends goes out in the one layout: the Minstrel name,
// its heading on the card, and a footer naming the sending server and why.
func TestEveryEmailIsFramedByTheLayout(t *testing.T) {
reset := func() (string, string, error) {
return RenderResetEmail(ResetEmailVars{
Username: "alice", ResetURL: "https://music.example/reset/abc", ExpiryHours: 1, Server: "https://music.example",
})
}
smtpTest := func() (string, string, error) { return RenderSMTPTestEmail("https://music.example/") }
for name, render := range map[string]func() (string, string, error){"reset": reset, "smtp test": smtpTest} {
text, html, err := render()
if err != nil {
t.Fatalf("%s: %v", name, err)
}
for _, want := range []string{
`">Minstrel</td>`,
"<h1 style=",
"Sent by the Minstrel server at https://music.example because ",
"— Minstrel",
} {
if !strings.Contains(html, want) {
t.Errorf("%s html is missing %q", name, want)
}
}
if !strings.Contains(text, "Sent by the Minstrel server at https://music.example because ") ||
!strings.HasSuffix(strings.TrimSpace(text), "— Minstrel") {
t.Errorf("%s text lacks the layout's footer:\n%s", name, text)
}
}
}
func TestFrameWithoutAPublicAddress(t *testing.T) {
content := fstest.MapFS{"c.txt": {Data: []byte("Hi.")}, "c.html": {Data: []byte("<p>Hi.</p>")}}
text, html, err := Render(content, "c.txt", "c.html", nil, Frame{
Heading: "Hello", Reason: "you asked", NotificationSettings: true,
})
if err != nil {
t.Fatal(err)
}
for _, body := range []string{text, html} {
if !strings.Contains(body, "Sent by your Minstrel server because you asked.") {
t.Errorf("footer should name the server generically:\n%s", body)
}
if !strings.Contains(body, "under Settings → Notifications") || strings.Contains(body, "http") {
t.Errorf("with no address, the settings line says where to look, without a link:\n%s", body)
}
}
}
// A misspelt style name fails the render rather than shipping an unstyled email.
func TestUnknownStyleFailsTheRender(t *testing.T) {
content := fstest.MapFS{"c.txt": {Data: []byte("x")}, "c.html": {Data: []byte(`<p style="{{style "lnik"}}">x</p>`)}}
if _, _, err := Render(content, "c.txt", "c.html", nil, Frame{Heading: "h", Reason: "r"}); err == nil {
t.Fatal("want an error for an unknown style")
}
}
+30 -31
View File
@@ -1,45 +1,44 @@
package mailer package mailer
import ( import "embed"
"bytes"
"embed"
"fmt"
htmltemplate "html/template"
texttemplate "text/template"
)
//go:embed templates/password_reset.txt templates/password_reset.html //go:embed templates/password_reset.txt templates/password_reset.html templates/smtp_test.txt templates/smtp_test.html
var resetEmailFS embed.FS var emailsFS embed.FS
// ResetEmailVars is the data passed to the password reset templates. // ResetEmailVars is the data passed to the password reset templates.
type ResetEmailVars struct { type ResetEmailVars struct {
Username string Username string
ResetURL string ResetURL string
ExpiryHours int ExpiryHours int
} // Server is the server's public address, named in the footer as the
// sender.
// RenderResetEmail returns (textBody, htmlBody) for the password Server string
// reset email, parameterized with the given vars.
func RenderResetEmail(vars ResetEmailVars) (string, string, error) {
textTpl, err := texttemplate.ParseFS(resetEmailFS, "templates/password_reset.txt")
if err != nil {
return "", "", fmt.Errorf("mailer: parse text template: %w", err)
}
htmlTpl, err := htmltemplate.ParseFS(resetEmailFS, "templates/password_reset.html")
if err != nil {
return "", "", fmt.Errorf("mailer: parse html template: %w", err)
}
var textBuf, htmlBuf bytes.Buffer
if err := textTpl.Execute(&textBuf, vars); err != nil {
return "", "", fmt.Errorf("mailer: render text: %w", err)
}
if err := htmlTpl.Execute(&htmlBuf, vars); err != nil {
return "", "", fmt.Errorf("mailer: render html: %w", err)
}
return textBuf.String(), htmlBuf.String(), nil
} }
// ResetEmailSubject is the subject line used by the forgot-password // ResetEmailSubject is the subject line used by the forgot-password
// flow. Exported so callers don't string-literal it independently. // flow. Exported so callers don't string-literal it independently.
const ResetEmailSubject = "Minstrel password reset" const ResetEmailSubject = "Minstrel password reset"
// RenderResetEmail returns (textBody, htmlBody) for the password reset
// email.
func RenderResetEmail(vars ResetEmailVars) (string, string, error) {
return Render(emailsFS, "templates/password_reset.txt", "templates/password_reset.html", vars, Frame{
Heading: "Reset your password",
Server: vars.Server,
Reason: "a password reset was requested for your account",
})
}
// SMTPTestSubject is the subject of the message an admin sends to check
// the server's email settings.
const SMTPTestSubject = "Minstrel email test"
// RenderSMTPTestEmail returns (textBody, htmlBody) for the email settings
// test message. server is the server's public address, or "".
func RenderSMTPTestEmail(server string) (string, string, error) {
return Render(emailsFS, "templates/smtp_test.txt", "templates/smtp_test.html", struct{}{}, Frame{
Heading: "Email is working",
Server: server,
Reason: "an admin sent a test from the email settings",
})
}
+29
View File
@@ -0,0 +1,29 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="dark">
<meta name="supported-color-schemes" content="dark">
</head>
<body style="{{style "page"}}">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="{{style "wrap"}}">
<tr><td align="center" style="padding:32px 16px;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="max-width:560px;">
<tr><td style="{{style "brand"}}">Minstrel</td></tr>
<tr><td style="{{style "card"}}">
<h1 style="{{style "heading"}}">{{.Frame.Heading}}</h1>
{{template "content" .Content}}
</td></tr>
<tr><td style="{{style "footer"}}">
Sent by {{.Frame.ServerName}} because {{.Frame.Reason}}.<br>
{{- if .Frame.NotificationSettings}}
{{with .Frame.SettingsURL}}<a href="{{.}}" style="{{style "faint"}}">Choose which notifications are emailed to you</a>{{else}}Choose which notifications are emailed to you in Minstrel, under Settings → Notifications.{{end}}<br>
{{- end}}
— Minstrel
</td></tr>
</table>
</td></tr>
</table>
</body>
</html>
+9
View File
@@ -0,0 +1,9 @@
{{.Frame.Heading}}
{{template "content" .Content}}
--
Sent by {{.Frame.ServerName}} because {{.Frame.Reason}}.
{{- if .Frame.NotificationSettings}}
{{with .Frame.SettingsURL}}Choose which notifications are emailed to you: {{.}}{{else}}Choose which notifications are emailed to you in Minstrel, under Settings → Notifications.{{end}}
{{- end}}
— Minstrel
+7 -29
View File
@@ -1,29 +1,7 @@
<!doctype html> <p style="{{style "p"}}">Hello <strong>{{.Username}}</strong>,</p>
<html> <p style="{{style "p"}}">A password reset was requested for your Minstrel account. To set a new
<body style="font-family: -apple-system, system-ui, sans-serif; max-width: 560px; margin: 0 auto; padding: 24px; color: #2c2c2c;"> password, use the button below within <strong>{{.ExpiryHours}}</strong> hours.</p>
<p>Hello <strong>{{.Username}}</strong>,</p> <p style="margin:24px 0;"><a href="{{.ResetURL}}" style="{{style "button"}}">Reset password</a></p>
<p style="{{style "p"}} {{style "quiet"}}">Or copy this address into your browser:<br>
<p>A password reset was requested for your Minstrel account. To set a new <span style="{{style "code"}}">{{.ResetURL}}</span></p>
password, click the button below within <strong>{{.ExpiryHours}}</strong> hours:</p> <p style="margin:0; {{style "quiet"}}">If you didn't ask for this, you can ignore this email. Your password won't change.</p>
<p style="margin: 24px 0;">
<a href="{{.ResetURL}}" style="display: inline-block; padding: 12px 24px;
background: #4a6b5c; color: #ffffff; text-decoration: none; border-radius: 6px;
font-weight: 500;">Reset password</a>
</p>
<p style="font-size: 14px; color: #666;">
Or copy this URL into your browser:<br>
<code style="word-break: break-all;">{{.ResetURL}}</code>
</p>
<p style="font-size: 14px; color: #666;">
If you didn't request this, you can safely ignore this email — your
password won't change.
</p>
<p style="font-size: 12px; color: #999; margin-top: 32px; border-top: 1px solid #eee; padding-top: 16px;">
— Minstrel
</p>
</body>
</html>
+2 -4
View File
@@ -5,7 +5,5 @@ password, follow this link within {{.ExpiryHours}} hours:
{{.ResetURL}} {{.ResetURL}}
If you didn't request this, you can safely ignore this email — your If you didn't ask for this, you can ignore this email. Your password
password won't change. won't change.
— Minstrel
+2
View File
@@ -0,0 +1,2 @@
<p style="{{style "p"}}">This is a test message from your Minstrel server.</p>
<p style="margin:0;">It arrived, so the server's email settings work: password resets and the notification emails people choose will reach their inboxes.</p>
+4
View File
@@ -0,0 +1,4 @@
This is a test message from your Minstrel server.
It arrived, so the server's email settings work: password resets and the
notification emails people choose will reach their inboxes.
+17 -21
View File
@@ -1,23 +1,17 @@
package notifications package notifications
import ( import (
"bytes"
"embed" "embed"
"encoding/json" "encoding/json"
"fmt" "fmt"
htmltemplate "html/template"
"strings" "strings"
texttemplate "text/template"
"git.fabledsword.com/bvandeusen/minstrel/internal/mailer"
) )
//go:embed templates/digest.txt templates/digest.html //go:embed templates/digest.txt templates/digest.html
var digestFS embed.FS var digestFS embed.FS
var (
digestText = texttemplate.Must(texttemplate.ParseFS(digestFS, "templates/digest.txt"))
digestHTML = htmltemplate.Must(htmltemplate.ParseFS(digestFS, "templates/digest.html"))
)
// digestEmail is one rendered email. // digestEmail is one rendered email.
type digestEmail struct { type digestEmail struct {
Subject string Subject string
@@ -38,22 +32,24 @@ type digestArtist struct {
} }
type digestVars struct { type digestVars struct {
Name string Name string
Intro string Intro string
Items []digestLine Items []digestLine
Artists []digestArtist Artists []digestArtist
SettingsURL string
} }
// renderDigest renders one group's email. base is the public address; with // renderDigest renders one group's email. base is the public address; with
// none set, the email still goes out, without links. // none set, the email still goes out, without links.
func renderDigest(group EmailGroup, name string, items []pendingItem, base string) (digestEmail, error) { func renderDigest(group EmailGroup, name string, items []pendingItem, base string) (digestEmail, error) {
vars := digestVars{Name: name, SettingsURL: joinURL(base, "/settings/notifications")} vars := digestVars{Name: name}
frame := mailer.Frame{Server: base, NotificationSettings: true}
var subject string var subject string
if group == EmailSummary { if group == EmailSummary {
vars.Artists = summaryArtists(items, base) vars.Artists = summaryArtists(items, base)
vars.Intro = "New in your library since the last summary:" vars.Intro = "New in your library since the last summary:"
subject = "Minstrel: new music in your library" subject = "Minstrel: new music in your library"
frame.Heading = "New music in your library"
frame.Reason = "you chose to get new-music summaries by email"
} else { } else {
for _, it := range items { for _, it := range items {
r := Render(it.Kind, it.Payload) r := Render(it.Kind, it.Payload)
@@ -61,19 +57,19 @@ func renderDigest(group EmailGroup, name string, items []pendingItem, base strin
} }
vars.Intro = "Here's what happened on Minstrel:" vars.Intro = "Here's what happened on Minstrel:"
subject = fmt.Sprintf("Minstrel: %d updates", len(items)) subject = fmt.Sprintf("Minstrel: %d updates", len(items))
frame.Heading = fmt.Sprintf("%d updates", len(items))
if len(items) == 1 { if len(items) == 1 {
subject = "Minstrel: " + vars.Items[0].Title subject = "Minstrel: " + vars.Items[0].Title
frame.Heading = vars.Items[0].Title
} }
frame.Reason = "you chose to get these notifications by email"
} }
var text, html bytes.Buffer text, html, err := mailer.Render(digestFS, "templates/digest.txt", "templates/digest.html", vars, frame)
if err := digestText.Execute(&text, vars); err != nil { if err != nil {
return digestEmail{}, fmt.Errorf("render text: %w", err) return digestEmail{}, fmt.Errorf("render digest: %w", err)
} }
if err := digestHTML.Execute(&html, vars); err != nil { return digestEmail{Subject: subject, Text: text, HTML: html}, nil
return digestEmail{}, fmt.Errorf("render html: %w", err)
}
return digestEmail{Subject: subject, Text: text.String(), HTML: html.String()}, nil
} }
// summaryArtists groups new-music arrivals by artist, in the order each // summaryArtists groups new-music arrivals by artist, in the order each
+12 -22
View File
@@ -1,25 +1,15 @@
<!doctype html> <p style="{{style "p"}}">Hello <strong>{{.Name}}</strong>,</p>
<html> <p style="margin:0;">{{.Intro}}</p>
<body style="font-family: -apple-system, system-ui, sans-serif; max-width: 560px; margin: 0 auto; padding: 24px; color: #2c2c2c;">
<p>Hello <strong>{{.Name}}</strong>,</p>
<p>{{.Intro}}</p>
{{range .Artists}} {{range .Artists}}
<p style="margin: 20px 0 4px; font-weight: 600;">{{if .URL}}<a href="{{.URL}}" style="color: #2c2c2c;">{{.Name}}</a>{{else}}{{.Name}}{{end}}</p> <p style="{{style "group"}}">{{if .URL}}<a href="{{.URL}}" style="{{style "link"}}">{{.Name}}</a>{{else}}{{.Name}}{{end}}</p>
{{if .Titles}}<ul style="margin: 0; padding-left: 20px;"> {{if .Titles}}<ul style="{{style "list"}}">
{{range .Titles}}<li style="margin: 2px 0;">{{if .URL}}<a href="{{.URL}}" style="color: #4a6b5c;">{{.Title}}</a>{{else}}{{.Title}}{{end}}</li> {{range .Titles}}<li style="{{style "item"}}">{{if .URL}}<a href="{{.URL}}" style="{{style "link"}}">{{.Title}}</a>{{else}}{{.Title}}{{end}}</li>
{{end}}</ul>{{end}} {{end}}</ul>{{end}}
{{end}}{{if .Items}} {{end}}{{if .Items}}
<ul style="margin: 16px 0; padding-left: 20px;"> <ul style="margin:16px 0 0; padding-left:20px;">
{{range .Items}}<li style="margin: 8px 0;"> {{range .Items}}<li style="margin:8px 0;">
{{if .URL}}<a href="{{.URL}}" style="color: #2c2c2c; font-weight: 600;">{{.Title}}</a>{{else}}<strong>{{.Title}}</strong>{{end}} {{if .URL}}<a href="{{.URL}}" style="{{style "link"}} font-weight:600;">{{.Title}}</a>{{else}}<strong>{{.Title}}</strong>{{end}}
{{if .Body}}<br><span style="color: #555;">{{.Body}}</span>{{end}} {{if .Body}}<br><span style="{{style "quiet"}}">{{.Body}}</span>{{end}}
</li> </li>
{{end}}</ul> {{end}}</ul>
{{end}} {{end}}
<p style="font-size: 12px; color: #999; margin-top: 32px; border-top: 1px solid #eee; padding-top: 16px;">
{{if .SettingsURL}}<a href="{{.SettingsURL}}" style="color: #999;">Choose which notifications are emailed to you</a>{{else}}Choose which notifications are emailed to you in Minstrel, under Settings → Notifications.{{end}}<br>
— Minstrel
</p>
</body>
</html>
@@ -11,6 +11,3 @@ Hello {{.Name}},
{{.Body}}{{end}}{{if .URL}} {{.Body}}{{end}}{{if .URL}}
{{.URL}}{{end}} {{.URL}}{{end}}
{{end}} {{end}}
{{if .SettingsURL}}Choose which notifications are emailed to you: {{.SettingsURL}}{{else}}Choose which notifications are emailed to you in Minstrel, under Settings → Notifications.{{end}}
— Minstrel