Skip to content

v5.4.0

Choose a tag to compare

@ianwieds ianwieds released this 05 Jun 21:02
· 18 commits to main since this release

Unified MJML Email System

Replace SendGrid dynamic templates with a unified MJML rendering pipeline. All email types (transactional, marketing, newsletter) now render server-side through the same prepare → template → MJML → HTML flow.

Highlights

  • 4 composable email templates: card (default), plain (full-width), order (9 payment events), feedback (rating faces)
  • Shared preparation layer (prepare.js): brand, sender, content rendering, signoff, categories, unsubscribe URLs
  • Unified data.content contract: all callers pass template-specific payload in data.content, system metadata injected by pipeline
  • UTM auto-tagging on ALL links (not just brand-domain), campaign name derived from caller categories
  • Marketing campaigns: seed campaigns with CTA buttons + audience-matched discount codes, per-recipient unsubscribe via ASM tags
  • Tests reorganized under test/email/, centralized product frequency in payment journeys, test account names for personalization

Breaking (internal API)

  • data.bodydata.content across all email callers and templates
  • data.orderdata.content for the order template
  • Marketing campaign content/discountCodedata.content.message/data.content.discountCode
  • Schema defaults changed from 'default' to 'card'
  • Template aliases (core/card, core/order/confirmation) removed — use direct names

See CHANGELOG.md and docs/email-system.md for full details.