Skip to main content

Emails

Cashlytics sends two kinds of email. Email is optional: without configuration the app works normally, but users cannot reset their password.

Transport​

The transport is chosen in src/lib/email/transporter.ts:

ModeHow to enableNotes
SMTPSet SMTP_HOST, SMTP_PORT, SMTP_USER, and SMTP_PASS (all four)Port 465 uses implicit TLS; other ports require STARTTLS. SMTP_PORT must be a number
sendmailEMAIL_TRANSPORT=sendmailUses /usr/sbin/sendmail inside the container. The published image does not ship a mail server, so this only works if one is available there

Only the value sendmail is meaningful for EMAIL_TRANSPORT. Leave it empty for SMTP. If any of the four SMTP variables is missing, SMTP is disabled and a warning is logged.

Sender address​

  • SMTP: SMTP_FROM, falling back to SMTP_USER.
  • sendmail: SMTP_FROM, then SMTP_USER, then noreply@localhost.

Emails sent​

Templates are React Email components in src/emails, rendered as HTML and plain text.

EmailSubjectTrigger
Password resetReset Your PasswordA user requests a reset. The link is valid for 1 hour
WelcomeWelcome to CashlyticsAfter a new account is registered. Sent in the background; failures are only logged

src/emails also contains base-template.tsx, the shared dark layout that loads the logo from https://cashlytics.online/logo.svg.

The password reset link is built as <APP_URL>/reset-password?token=.... The base URL is APP_URL, then NEXT_PUBLIC_APP_URL, then http://localhost:3000. Set APP_URL (or NEXT_PUBLIC_APP_URL) to your public domain, otherwise reset links point to localhost. See Environment Variables.

The reset request always shows the same message, whether or not the address exists, and never reveals whether a mail was sent.

Without email configuration​

  • No password reset or welcome mails are sent. The request is answered normally and the log shows Email not sent (not configured).
  • A locked-out user cannot recover the password by email.

Payment reminders are not emails​

Reminders for upcoming payments are delivered only as push notifications, never by email. See Push Notifications and Scheduled Jobs.