Server: Fixes #16448: Add email (SMTP) setup to .env-sample and documentation - #16545
Server: Fixes #16448: Add email (SMTP) setup to .env-sample and documentation#16545abhinav-phi wants to merge 3 commits into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
@abhinav-phi the pull request title does not match the required format. Please prefix the title with the area you are targeting, then add the issue you are addressing. If the change targets several areas, separate them with commas. For example:
See the pull request template for the list of valid prefixes and the full specification. This PR has been closed automatically. Once you update the title to match the format above, the PR will be reopened automatically. |
|
I have read the CLA Document and I hereby sign the CLA |
|
@abhinav-phi thanks for fixing the title — this PR has been reopened. |
|
I have read the CLA Document and I hereby sign the CLA |
… 'none' with credentials
|
Thanks for the pull request and for taking the time to contribute. At the moment, due to limited review capacity, we're only accepting pull requests from long-term contributors who are already familiar with the project and its development process. As a result, I'm going to close this PR. This is not a reflection on the quality of your work. We simply don't have the resources right now to properly review and maintain contributions from new contributors. More information in this discussion. Thanks again for your interest in the project and for taking the time to contribute. |
Problem
Joplin Server already supports sending emails (password reset links, email-change confirmations, payment notices, etc.) via SMTP, reading a full set of
MAILER_*environment variables (packages/server/src/env.ts, consumed byEmailService.ts/config.ts). However, none of these variables were present in the default.env-samplethat self-hosters start from, and the server documentation did not mention email setup at all — so the feature was effectively undiscoverable. Fixes #16448.What this changes
Docs-only change, no runtime behavior:
.env-sample— added an "Email (SMTP) config example" section (commented out, matching the existing style of the file) listing all 8 variables:MAILER_ENABLED,MAILER_HOST,MAILER_PORT,MAILER_SECURITY,MAILER_AUTH_USER,MAILER_AUTH_PASSWORD,MAILER_NOREPLY_NAME,MAILER_NOREPLY_EMAIL.packages/server/README.md— added a "Setting up email (SMTP)" section (between "Setup storage" and "Verify access to the admin page", following the same optional-step format as the neighbouring sections) with aconfexample block and a description of each variable.All defaults, valid values and behaviours documented were verified against
env.ts(MailerSecurityenum =tls/starttls/none, defaults port 465 / security tls) andEmailService.ts(service disabled whenMAILER_HOSTis unset orMAILER_ENABLEDis false;MAILER_NOREPLY_EMAILrequired).Note on tests
The monorepo install repeatedly failed on my Windows machine (yarn cache/link EPERM-ENOENT races), so
packages/server/src/env.test.tscould not be executed locally. Since this PR changes no code (only.env-sampleand a Markdown file, neither of which is referenced by any test), this has no bearing on the change.How to test
Self-host the server using the updated
.env-sample(uncomment the email block), run with a working SMTP server and confirm a password-reset email is delivered.