Email Types

Foundation

Core contracts for the email subsystem: EmailMessage, EmailSendResult, EmailRenderResult, EmailProvider, EmailTemplateDefinition, and EmailTemplateRenderContext. All template, transport, and rendering code builds on these types.

core/email-types

Installation

1 · Add registry to components.json

2 · Install component

API Reference

PropTypeDescription
EmailMessage
interfaceNormalized 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
interfacesend(message) → Promise<EmailSendResult> — provider adapter contract.
EmailTemplateDefinition<Props>
interfaceTyped template: templateId, subject fn, component, previewProps.
EmailThemeTokens
interfaceFully resolved email-safe token set: all colors as #rrggbb, font stacks, border radii as px strings.
EmailTemplateRenderContext
interfaceMinimal context passed to templates: theme, siteUrl?, locale?. Logo/brand fields belong in individual template props.