Skip to content

Interface: EmailPluginConfig

AppKit config accepted by the email plugin.

  • BasePluginConfig

[key: string]: unknown

optional allowedSenders?: string | string[]

Allow-list restricting the sender (From) address. Each entry is an exact address (user@domain.com), a domain wildcard (*@domain.com or the bare domain.com, matching any local part on that domain), or * (any). A resolved / chosen sender that matches no entry is rejected at send time. Accepts a string[] or a single comma- / whitespace-separated string; falls back to EMAIL_ALLOWED_SENDERS. When empty, the senderPolicy decides what is permitted.


optional brand?: EmailBrand

Optional brand styling applied to every rendered message. Omit to use the repository’s dbx-tools brand. Pass emailBrandFromContext to derive a custom value from a shared BrandContext.


optional domain?: string

Domain used to build the sender address from the on-behalf-of user (<local-part>@<domain>). Falls back to EMAIL_DOMAIN. Required in SMTP mode unless from is set; optional in file mode (the outbox falls back to the user’s own email address).


optional from?: string

Explicit From address, OPTIONAL. When set, the sender is used verbatim and the per-user derivation is skipped. Falls back to EMAIL_FROM.

Leave it unset in most deployments: domain alone is enough, and mail then comes from the address of the person who caused it, which is what a recipient expects to be able to reply to.


optional host?: string

BasePluginConfig.host


optional name?: string

BasePluginConfig.name


optional outDir?: string

Directory for the file/outbox fallback. Falls back to EMAIL_OUTBOX_DIR, then <cwd>/tmp. Only used when SMTP credentials are absent.


optional senderPolicy?: SenderPolicy

How the sender address is restricted when allowedSenders is empty (EMAIL_SENDER_POLICY). Defaults to "allowlist", which narrows sends to the configured sender source. See SenderPolicy.


optional smtp?: SmtpConfig

SMTP connection + credentials. Omit to run in file/outbox mode.


optional systemFrom?: string

From for SYSTEM mail - a send with no on-behalf-of user, such as a sign-in code or a password reset. Falls back to EMAIL_SYSTEM_FROM, then to no-reply@<domain>, then to from.

Machine mail gets a do-not-reply address by default because a reply to it reaches nobody. Set this to route those replies somewhere real (a monitored support@) or to spell the local part differently (donotreply@).


optional telemetry?: TelemetryOptions

BasePluginConfig.telemetry