Version 3 of the kit: - Radix UI replaced with Base UI (using the Shadcn UI patterns) - next-intl replaces react-i18next - enhanceAction deprecated; usage moved to next-safe-action - main layout now wrapped with [locale] path segment - Teams only mode - Layout updates - Zod v4 - Next.js 16.2 - Typescript 6 - All other dependencies updated - Removed deprecated Edge CSRF - Dynamic Github Action runner
823 B
823 B
@kit/mailers — Email Service
Non-Negotiables
- ALWAYS use
getMailer()factory from@kit/mailers— never instantiate mailer directly - ALWAYS use
@kit/email-templatesrenderers for HTML — never write inline HTML - ALWAYS render template first (
renderXxxEmail()), then pass{ html, subject }tosendEmail() - NEVER hardcode sender/recipient addresses — use environment config
Workflow
- Render:
const { html, subject } = await renderXxxEmail(props) - Get mailer:
const mailer = await getMailer() - Send:
await mailer.sendEmail({ to, from, subject, html })
Exemplars
- Contact form:
apps/web/app/[locale]/(marketing)/contact/_lib/server/server-actions.ts - Invitation dispatch:
packages/features/team-accounts/src/server/services/account-invitations-dispatcher.service.ts