Email Notifications
TREK can send email notifications for important events via SMTP, and optionally forward them to webhooks (Discord, Slack, etc.).
SMTP Setup
Configure your mail server in Admin Panel → Settings → SMTP:
| Field | Description |
|---|---|
| SMTP Host | Mail server hostname (e.g. smtp.gmail.com, mail.yourdomain.com) |
| SMTP Port | Port number — 587 for STARTTLS, 465 for SSL, 25 for unencrypted |
| SMTP User | Username for authentication |
| SMTP Password | Password or app-specific password |
| From Address | Sender email address shown in notifications |
| Skip TLS Verify | Toggle for self-signed certificates on local/LAN mail servers |
| App URL | Your TREK instance URL (e.g. https://trek.example.com) — used for links in emails |
After saving, use the Test email button to verify your configuration.
Self-hosted mail servers: If your mail server uses a self-signed certificate (common for LAN setups), enable the "Skip TLS certificate verification" toggle. This sets
tls: { rejectUnauthorized: false }in the mail transport.
Gmail Example
- Enable 2-Step Verification in your Google account
- Generate an App Password for "Mail"
- In TREK:
- Host:
smtp.gmail.com - Port:
587 - User:
your-email@gmail.com - Password: the generated app password
- From:
your-email@gmail.com
- Host:
Environment Variables
SMTP can also be configured via environment variables (they take priority over UI settings):
environment:
SMTP_HOST: smtp.gmail.com
SMTP_PORT: 587
SMTP_USER: trek@gmail.com
SMTP_PASS: app-specific-password
SMTP_FROM: trek@gmail.com
SMTP_SKIP_TLS_VERIFY: "false"
APP_URL: https://trek.example.com
Notification Types
TREK sends notifications for the following events:
| Event | Description |
|---|---|
| Trip invitation | When you are added to a trip |
| Booking changes | When a reservation is created or modified in your trip |
| Trip reminders | Upcoming trip reminders |
| Vacay invitation | When invited to a vacation plan |
| Photos shared | When someone shares photos to a trip |
| Collab messages | New messages in trip chat |
| Packing assignment | When a packing category is assigned to you |
Notification Preferences
Each user can configure their notification preferences in Settings → Notifications:
- Toggle each notification type on/off individually
- Addon-aware — toggles for Vacay, Collab, and Photos only appear when those addons are enabled
- Webhook delivery can be toggled separately
Webhooks
Configure a webhook URL in Admin Panel → Settings → Webhooks to receive notifications via:
- Discord — Paste a Discord webhook URL
- Slack — Paste a Slack incoming webhook URL
- Custom — Any HTTP endpoint that accepts POST requests
Webhook URL can also be set via the NOTIFICATION_WEBHOOK_URL environment variable.
Email Template
Notification emails use a branded HTML template with:
- TREK logo and header
- Event-specific content with trip details
- Direct link to the relevant trip (requires
APP_URLto be set) - Multi-language support — emails are sent in the recipient's preferred language (12 languages supported)
- Clean, modern design with TREK branding