Skip to main content
The Fleet Management System sends transactional emails via SMTP using Nodemailer. The SMTP connection is configured through environment variables in packages/backend/.env.

What emails are sent

When a technician submits a vehicle inspection, the backend automatically emails the fleet administrator with:
  • Subject: configurable per call site
  • Body: vehicle details (brand, model, licence plate), current mileage, and inspection timestamp
  • Attachment: a PDF inspection report (inspeccion_<id>.pdf)
No other automated emails are sent by the system at this time.

SMTP environment variables

SMTP_HOST
string
default:"127.0.0.1"
Hostname of the SMTP server. Set to 127.0.0.1 for the local Mailpit container.
SMTP_PORT
number
default:"1025"
SMTP port. Mailpit listens on 1025. Use 587 (STARTTLS) or 465 (TLS) for production providers.
SMTP_SECURE
boolean
default:"false"
Set to true to wrap the connection in TLS from the start (required for port 465). Use false for STARTTLS (port 587) or unencrypted local connections.
SMTP_USER
string
SMTP authentication username. Leave empty when using Mailpit locally — it accepts all connections without credentials.
SMTP_PASS
string
SMTP authentication password. Leave empty when using Mailpit locally.
EMAIL_FROM
string
The From address on all outbound emails. Must be a valid address accepted by your SMTP provider in production.
If SMTP_HOST or SMTP_PORT is not set, the email service falls back to a JSON transport that logs messages to stdout instead of sending them. This means emails are silently dropped rather than causing a startup error.

Configuration by environment

Mailpit is included in the Docker Compose file. It acts as a local SMTP server and provides a web UI to inspect captured emails without sending anything to real addresses.Start Mailpit:
docker compose up -d mailpit
Mailpit exposes two ports:
  • 1025 — SMTP (receives messages from the backend)
  • 8025 — Web UI (view captured emails in a browser)
Open http://localhost:8025 to view all emails sent by the application.packages/backend/.env (default values already work):
SMTP_HOST=127.0.0.1
SMTP_PORT=1025
SMTP_SECURE=false
SMTP_USER=
SMTP_PASS=
EMAIL_FROM=[email protected]
No changes are required to the default .env.example values for local development.

Build docs developers (and LLMs) love