Configuration

Email

SMTP configuration for transactional emails and notifications.

Overview

Retrospend uses Nodemailer to send transactional emails via SMTP. Without SMTP configuration, emails are skipped and logged to the console instead.

Environment Variables

VariableRequiredDefaultDescription
SMTP_HOSToptional-SMTP server hostname.
SMTP_PORToptional587SMTP port. Use 465 for implicit TLS.
SMTP_USERoptional-SMTP authentication username.
SMTP_PASSWORDoptional-SMTP authentication password.
EMAIL_FROMoptional-Sender address (e.g. Retrospend <[email protected]>).
UNSUBSCRIBE_SECREToptional-Secret for signing one-click unsubscribe links. Generate with: openssl rand -base64 32

TLS

TLS is handled automatically based on the port. Port 465 uses implicit TLS. All other ports use STARTTLS when the server supports it.

Email Templates

Retrospend sends 8 types of emails:

  • Verification: sent on signup to confirm the email address.
  • Password reset: one-time link to set a new password.
  • Password changed: confirmation after a password update.
  • Email change verification: confirm the new address before switching.
  • Email change alert: notifies the old address that a change was requested.
  • Notifications: shared expense updates, settlements, project invites.
  • Feedback to admin: user feedback forwarded to the admin email.
  • SMTP test: sent from the admin panel to verify the configuration.

Unsubscribe

The UNSUBSCRIBE_SECRET is used to generate signed one-click unsubscribe links in notification emails. When a user clicks the link, their notification preferences are updated without requiring login. If not set, unsubscribe links are omitted from emails.

Admin Controls

The admin can toggle email sending globally from the admin panel. Individual users can manage their notification preferences in Settings.

Tip

Use the SMTP test button in the admin panel to verify your configuration before going live.