You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: add EMAIL_TLS_REJECT_UNAUTHORIZED env variable to support self-signed SMTP certificates #605
Is your feature request related to a problem? Maybe it would be better as discussion? Please describe.
When self-hosting SplitPro behind a local SMTP relay that uses a self-signed certificate (e.g., ProtonMail Bridge),
the magic-link email fails with Error: self-signed certificate. This is because rejectUnauthorized in mailer.ts is
hardcoded to true in production with no way to override it via environment variable.
Describe the solution you'd like
Add an environment variable — e.g. EMAIL_TLS_REJECT_UNAUTHORIZED (default: true) — that controls the
rejectUnauthorized option passed to the nodemailer transport:
This would allow self-hosters using local SMTP relays with self-signed certificates to disable certificate
verification explicitly.
Describe alternatives you've considered
Setting NODE_ENV=development at runtime — ineffective because NODE_ENV is baked into the compiled Next.js bundle at
build time, not read at runtime.
Patching the compiled chunks with sed in a custom Docker image — works but breaks on every update and is not a
maintainable solution.
Using an OAuth provider (Google, OIDC) to bypass SMTP for auth — not always viable for self-hosters who want a fully
local setup with no external dependencies.
This affects any self-hoster using a local SMTP relay with a self-signed certificate (ProtonMail Bridge, local
Postfix, etc.). The fix is minimal — one env variable, one line change in mailer.ts.
Activity