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)
| 91 | // per-template footer note. Plain text intentionally stays minimal — |
| 92 | // no chrome, no decorative separators beyond the dashed rule. |
| 93 | func 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 | |
| 108 | GitHub: https://github.com/PerpetualSoftware/pad |
| 109 | Docs: https://getpad.dev/docs |
| 110 | Changelog: https://getpad.dev/changelog |
| 111 | Contribute: https://getpad.dev/contribute |
| 112 | FAQ: https://getpad.dev/faq |
| 113 | Security: https://getpad.dev/security |
| 114 | Privacy: https://getpad.dev/privacy |
| 115 | Terms: https://getpad.dev/terms |
| 116 | Sub-processors: https://getpad.dev/subprocessors |
| 117 | |
| 118 | (c) %d Pad — Perpetual Software`, year)) |
| 119 | } |
| 120 | return b.String() |
| 121 | } |