plugin
AppKit plugin (registered name: email) that owns the SMTP runtime
for outbound mail. Registering it validates the SMTP configuration
and verifies connectivity at startup, so a bad host / credential
surfaces in the boot logs instead of on the first approved send, and
installs this plugin’s execute() as the runtime’s executor so every
send picks up AppKit’s retry / timeout / telemetry chain.
The plugin is also a ToolProvider, so an AppKit agent can reach an
email.send tool directly; the emailTool export is the same
capability for a Mastra agent. Both share the transport primed here,
and sendEmail is available to non-agent callers.
Configuration is the manifest-published EmailPluginConfig
(SMTP host/port/credentials, sender domain or explicit from, the
sender policy, and an optional allowedSenders restriction), with
unprefixed SMTP_* / EMAIL_* environment fallbacks.
The plugin mounts one route under its base path (/api/email):
GET /senders returns the permitted From options for the calling
user, so a compose UI can offer them in a dropdown.