Email Types
FoundationCore contracts for the email subsystem: EmailMessage, EmailSendResult, EmailRenderResult, EmailProvider, EmailTemplateDefinition, and EmailTemplateRenderContext. All template, transport, and rendering code builds on these types.
core/email-typesInstallation
1 · Add registry to components.json
2 · Install component
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
EmailMessage | interface | — | Normalized outbound email: from, to, cc, bcc, subject, html, text, attachments, tags, headers. |
EmailSendResult | interface | — | { ok, messageId?, error? } — result from any provider. |
EmailRenderResult | interface | — | { subject, html, text } — output from template rendering. |
EmailProvider | interface | — | send(message) → Promise<EmailSendResult> — provider adapter contract. |
EmailTemplateDefinition<Props> | interface | — | Typed template: templateId, subject fn, component, previewProps. |
EmailThemeTokens | interface | — | Fully resolved email-safe token set: all colors as #rrggbb, font stacks, border radii as px strings. |
EmailTemplateRenderContext | interface | — | Minimal context passed to templates: theme, siteUrl?, locale?. Logo/brand fields belong in individual template props. |