Skip to main content

Email Foundation

Last reviewed: 2026-05-13
Maintained by: Engineering

Zgrid’s email delivery is API-driven and environment-configured.

Current model

  • email sending runs from apps/api
  • provider selection is controlled by EMAIL_PROVIDER
  • local development should use EMAIL_PROVIDER=dev_log
  • hosted environments can switch to a real provider with the matching credentials in environment-managed secrets

Key implementation areas

  • env contract: apps/api/src/config/env.ts
  • email services and templates: apps/api/src/features/email
  • invitation and auth email flows depend on EMAIL_ACTION_BASE_URL, EMAIL_FROM, EMAIL_REPLY_TO, and EMAIL_SUPPORT_ADDRESS

Operational guidance

  • keep local delivery non-production by default
  • never hardcode provider credentials in source
  • update the environment contract and infrastructure docs in the same PR when email configuration changes

See also: