For the complete documentation index, see llms-docs.txt or the site index llms.txt. Full docs corpus: llms-full-docs.txt. Prefer the markdown version of this page at /docs/setup/backend/email.md. Product capabilities: skill.md. Docs MCP: /docs/mcp. Site MCP: /mcp.

Email

Set up, configure, and run the Reloop platform email microservice locally.

Platform transactional emails triggered by NATS events (invites, OTPs, billing alerts).

Run bun setup once from the monorepo root. Env files come from bun setup / bun env:setup.

EmailMail. Email sends platform notifications to Reloop users (invites, password resets). Mail is the customer-facing send API for their audiences.

Overview

PropertyValue
Directoryapps/backend/email
Port8022
Local URLhttps://local.reloop.sh/api/email
Swagger UIhttps://local.reloop.sh/api/email/openapi
StackElysiaJS · Redis · NATS

Quick start

bun be:email:dev

Or bun backend:dev / bun dev. Locally, when RELOOP_API_KEY is unset, mail falls back to Mailpit SMTP (localhost:1025).

Environment

apps/backend/email/.env — from bun setup / bun env:setup.

EMAIL_PORT=8022
PORT=8022
BASE_URL="https://local.reloop.sh"
NATS_URL=nats://localhost:4222
RELOOP_API_KEY=
RELOOP_SENDER_DOMAIN=
ONBOARDING_TEST_DOMAIN=
NODE_ENV=development
VariableRequiredDefaultNotes
EMAIL_PORT / PORTYES8022Listening port
BASE_URLYEShttps://local.reloop.shPlatform base URL
NATS_URLYESnats://localhost:4222Event subscriptions
RELOOP_API_KEYProdAPI key for the org that owns the sender domain(s); used by reloop-email
RELOOP_SENDER_DOMAINProdSystem product mail From domain (auth, billing, invites)
ONBOARDING_TEST_DOMAINProdOnboarding “Send email” From domain only (can differ)

Commands

CommandDescription
bun be:email:devStart dev server with hot reloading
bun run --filter=be-email buildCompile production bundle
bun run --filter=be-email startRun compiled production build
bun run --filter=be-email check-typesTypeScript type-check

Architecture

LayerDetail
TriggersSubscribes to NATS subjects (auth.*, billing.*, etc.)
DeliverySends via the mail pipeline using RELOOP_API_KEY when set
Schemaemail_log in packages/db/src/schema/email.ts

Next

Was this page helpful?

Edit this page