Skip to content

config

SMTP configuration for the email plugin: the typed EmailPluginConfig (the plugin’s slice of AppKit config), the JSON Schema the manifest publishes for it, and resolveEmailConfig which layers that config over environment defaults into the concrete ResolvedEmailConfig the runtime needs.

Two modes fall out of the resolution. When SMTP credentials (host + user + password) are all present it resolves to mode: "smtp" and mail is sent for real. When they are absent and EMAIL_OUTBOX_MODE is explicitly enabled it resolves to mode: "file" (an “outbox”) and each message is written to disk as HTML instead of sent. Any partial SMTP configuration or a send attempt with no credentials and no outbox opt-in throws.

Precedence per field: explicit plugin config wins, then the matching environment variable. Env names are unprefixed because the app talks to a single SMTP server (e.g. SMTP2GO): SMTP_HOST, SMTP_PORT, SMTP_SECURE, SMTP_USER, SMTP_PASSWORD, plus EMAIL_DOMAIN for the derived sender’s domain, EMAIL_FROM for an explicit override, EMAIL_SYSTEM_FROM for the do-not-reply address system mail sends from, EMAIL_SENDER_POLICY for the sender restriction mode, and EMAIL_OUTBOX_DIR for the outbox directory.