New: Add branded templated email rendering (fixes #58)#59
Merged
Conversation
github-actions Bot
pushed a commit
that referenced
this pull request
Jun 20, 2026
# [1.6.0](v1.5.0...v1.6.0) (2026-06-20) ### Chore * add adapt-authoring-server devDependency for tests ([56f9898](56f9898)) * Rename email template to default.html (refs #58) ([1148b27](1148b27)), closes [#58](#58) ### Fix * Centre emblem icons and use a green success check (refs #58) ([bef7b48](bef7b48)), closes [#58](#58) ### New * Add branded templated email rendering (fixes #58) ([ac02c01](ac02c01)), closes [#58](#58) * Add branded templated email rendering (fixes #58) (#59) ([3b551b6](3b551b6)), closes [#58](#58) [#59](#59) ### Update * Add ADAPT wordmark to the email logo (refs #58) ([6f9cc70](6f9cc70)), closes [#58](#58) * Use · entity in email footer separator (refs #58) ([a4a7e62](a4a7e62)), closes [#58](#58)
|
🎉 This PR is included in version 1.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #58
New
MailerModule.sendTemplated({ to, subject, content })— renders a single branded HTML shell and sends a multipart text + HTML email. Domain-agnostic: callers pass already-translated copy + runtime values; branding is injected and images CID-embedded.templates/email.html— one email-safe Mustache shell (table layout, inline styles, MSO conditional, preheader, mobile media query) with optionalemblemandbuttonsections.lib/utils.js):renderEmail(shell + content + branding → HTML, body→paragraphs, HTML-escaped),renderText(plain-text alternative from content),resolveBranding(config → branding).logo-cyan.png+emblem-{spark,key,check,bell}.png(the emblems are recoloured@mui/icons-materialglyphs).supportEmailconfig;attachmentsadded to the maildata schema.mustachedependency.Notes
appName+ theme colours) is read fromadapt-authoring-core(see core PR #119). Copy is expected to live in a langpack and be translated by the caller — keeps emails localisable; the langpack keys and theauth-localcall-site migration are separate PRs.send()and theMailDataschema are unchanged (backwards compatible).Testing
npm test— 117 pass (new specs forrenderEmail/renderText/resolveBranding+sendTemplatedblock in the module spec).npx standardclean.