Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Parth-420/Zapmail/llms.txt

Use this file to discover all available pages before exploring further.

Zapmail requires the following environment variables to be set for proper operation.

Server configuration

PORT
string
required
The port number on which the SMTP server listens for incoming connections.The server will fail to start if this variable is not set.Example: 2525 or 25

Database configuration

Backend database connection

SUPABASE_CONN_STRING
string
required
PostgreSQL connection string for the Supabase database used by the Go backend.This string contains all necessary database connection parameters including host, port, database name, user, and password.The server will fail to start if this variable is not set or if the database cannot be reached.Example: postgresql://user:password@host:5432/databaseUsage: backend/main.go:174

Frontend database connection

DATABASE_URL
string
required
PostgreSQL connection string for the frontend Next.js application.This connection string is used by the Next.js server actions to query emails from the database.Example: postgresql://user:password@host:5432/databaseUsage: ui/src/lib/db.ts:4
Both SUPABASE_CONN_STRING and DATABASE_URL should point to the same PostgreSQL database but are used by different parts of the application (backend vs frontend).

Environment files

Backend environment file

You can set these variables in a .env file in the backend directory:
PORT=2525
SUPABASE_CONN_STRING=postgresql://user:password@host:5432/database
The server will automatically load environment variables from the .env file if present (backend/main.go:28-32).

Frontend environment file

For the Next.js frontend, create a .env.local file in the ui directory:
DATABASE_URL=postgresql://user:password@host:5432/database

Build docs developers (and LLMs) love