feat(shared): decompose SMTP_CONNECTION_URL into individual env vars#1002
Merged
feat(shared): decompose SMTP_CONNECTION_URL into individual env vars#1002
Conversation
This comment has been minimized.
This comment has been minimized.
msukkari
added a commit
that referenced
this pull request
Mar 13, 2026
Contributor
|
Caution Review failedPull request was closed or merged during review WalkthroughThis PR introduces support for configuring SMTP via individual environment variables (SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD) as an alternative to SMTP_CONNECTION_URL. A new utility function constructs SMTP connection URLs from individual variables when the monolithic connection string is unavailable. Documentation and email-sending code paths are updated accordingly. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add support for configuring SMTP via individual environment variables (SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD) similar to how DATABASE_URL can be decomposed. Create getSMTPConnectionURL() helper in new smtp.ts module that constructs the connection URL, maintaining backward compatibility with SMTP_CONNECTION_URL. Update entrypoint.sh, auth.ts, and actions.ts to use the new helper. Decomposition is supported both at the shell level (entrypoint.sh) and TypeScript level (smtp.ts). Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
b1f4b9b to
cafbb23
Compare
… decomposed vars Move SMTP URL construction entirely into getSMTPConnectionURL() in TypeScript. When using decomposed env vars, all four (SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD) are now required. Logs an error listing missing vars if incomplete. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for configuring SMTP via individual environment variables (SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD) as an alternative to providing the full SMTP_CONNECTION_URL. This mirrors how DATABASE_URL can be decomposed into separate components.
Changes
packages/shared/src/smtp.tswithgetSMTPConnectionURL()helper that constructs the connection URL, maintaining backward compatibilitypackages/shared/src/env.server.tsto define the new SMTP environment variablesentrypoint.shto support SMTP URL construction at the shell levelpackages/web/src/auth.tsandpackages/web/src/actions.tsto use the new helper functionFixes SOU-637
Summary by CodeRabbit
New Features
Documentation