MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / buildPlainShell

Function buildPlainShell

internal/email/shell.go:93–121  ·  view source on GitHub ↗

buildPlainShell builds the plain-text body for transactional emails. Self-hosted output is byte-equivalent to the prior templates. Cloud output adds a small marketing-link block and copyright line below the per-template footer note. Plain text intentionally stays minimal — no chrome, no decorative s

(bodyText, footerNoteText string, cloudMode bool)

Source from the content-addressed store, hash-verified

91// per-template footer note. Plain text intentionally stays minimal —
92// no chrome, no decorative separators beyond the dashed rule.
93func buildPlainShell(bodyText, footerNoteText string, cloudMode bool) string {
94 var b strings.Builder
95 b.WriteString(bodyText)
96 if footerNoteText != "" {
97 b.WriteString("\n\n---\n")
98 b.WriteString(footerNoteText)
99 }
100 if cloudMode {
101 // Same nine canonical links as the HTML branch (docs/brand.md §7).
102 // Plain text uses fixed-width labels for legibility in monospaced
103 // mail clients; URL alignment doesn't matter visually but reads
104 // cleanly when piped through a screen reader.
105 year := time.Now().UTC().Year()
106 b.WriteString(fmt.Sprintf(`
107
108GitHub: https://github.com/PerpetualSoftware/pad
109Docs: https://getpad.dev/docs
110Changelog: https://getpad.dev/changelog
111Contribute: https://getpad.dev/contribute
112FAQ: https://getpad.dev/faq
113Security: https://getpad.dev/security
114Privacy: https://getpad.dev/privacy
115Terms: https://getpad.dev/terms
116Sub-processors: https://getpad.dev/subprocessors
117
118(c) %d Pad — Perpetual Software`, year))
119 }
120 return b.String()
121}

Callers 7

SendInvitationMethod · 0.85
SendWelcomeMethod · 0.85
SendPasswordResetMethod · 0.85
SendEmailVerificationMethod · 0.85
SendPaymentFailedMethod · 0.85
SendTestMethod · 0.85

Calls 2

StringMethod · 0.80
NowMethod · 0.65

Tested by 1