Server: Fixes #16448: Add email (SMTP) setup to .env-sample and documentation #16545
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 247 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.330
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #16545"
general
weight: 0.35
abhinav-phi
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:
1.
.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.2.
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.