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:
| Mode | How to enable | Notes |
|---|---|---|
| SMTP | Set 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 |
| sendmail | EMAIL_TRANSPORT=sendmail | Uses /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 toSMTP_USER. - sendmail:
SMTP_FROM, thenSMTP_USER, thennoreply@localhost.
Emails sent
Templates are React Email components in src/emails, rendered as HTML and plain text.
| Subject | Trigger | |
|---|---|---|
| Password reset | Reset Your Password | A user requests a reset. The link is valid for 1 hour |
| Welcome | Welcome to Cashlytics | After 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.