mail-templates

Branded, email-client-safe HTML and a plain-text twin for every message, themed with the venture’s own colours and logo.

With cargo

cargo add cratefield-mail-templates

What it is

mail-templates.

Branded transactional mail for Cratefield ventures: one email-client-safe layout, themed with the venture’s own website colours, logo and fonts, and a plain-text twin for every message. Every harness module that sends mail — waitlist, email-signup, orgs, notifications, magic link, password reset, the control-plane console — renders through it, so a change to how mail looks is one change rather than seven. Generalised from Owlpost’s own templates, which is why they are the shape they are.

From the crate’s own README.

History

Changelog.

From the crate’s CHANGELOG.md in the harness, as of 0c5560b. 4 versions recorded, newest first. Every published version is on crates.io.

  1. 0.1.3

    crates.ioReleaseDiff

    Other

    • updated the following local packages: cratefield-core
  2. 0.1.2

    crates.ioReleaseDiff

    Fixed

    • auth a webview can press the magic-link confirm button; themeable hosted pages and mail; friendly validation (#840) (#841)

    Added

    • MailTheme::header_bg / header_text and display_font (issue #840), all opt-in: a solid header band behind the logo row, joined to the card (inline, so Gmail keeps it), and a heading font stack. Both are sanitised like the other colours and fonts; unset, every mail renders as before.
2 earlier versions 0.1.0 to 0.1.1
  1. 0.1.1

    crates.ioReleaseDiff

    Other

    • one branded instance per app; cratefield-auth-* crates; Owlpost mail (#778)
  2. 0.1.0

    crates.ioRelease

    Added

    • mail-templates branded mail in each venture's own style for every module that sends mail (#715) (#716)
    • MailTheme (brand name, wordmark, hosted logo and alt text, light and dark Palettes, font stacks, radii, footer lines, contact), resolved from the venture's composition, its MAIL_THEME config, or its core Brand; and MailTheme::cratefield(), Cratefield's own theme.
    • Message, a builder for one mail (heading, paragraphs, facts, primary button, fallback link, code, notes, recipient and reason, footer links, lang and dir) rendering an email-client-safe HTML part with a dark variant and a plain-text twin, every value escaped (#715).

One of 76 crates in the harness, all of them MIT and all of them in one repository.