emailshell

package
v1.0.2-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package emailshell is the Rivolt look for HTML email: a 560 px card under an emerald bolt mark, light and dark, system fonts, no images and no remote content. FromText wraps a plain-text body in it word for word, so the HTML part can never say something the text part does not. Every email Rivolt sends goes out in it: internal/email wraps any message that arrives without the shell.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Branded added in v1.0.2

func Branded(h string) bool

Branded reports whether h is a document built by Wrap.

func FromText

func FromText(title, text string) string

FromText renders a plain-text email as HTML in the shell. Blank lines separate paragraphs, single newlines stay line breaks, and every http(s) address becomes a link whose text is the address itself. The last paragraph (the sign-off and the not-affiliated line) is set small and muted; the words are unchanged.

func FromTextCTA added in v1.0.2

func FromTextCTA(title, text, label, href string) string

FromTextCTA is FromText with one primary action: an emerald button labelled label that links to href, placed above the paragraph that holds the plain link (the fallback for clients that block buttons). href must be http(s) and appear in text; otherwise there is no button. The text part is not touched.

func Wrap

func Wrap(title, bodyHTML string) string

Wrap puts bodyHTML (already escaped, trusted markup) in the shell. title is the subject: it becomes the document title.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL