Skip to content

Server: Fixes #16448: Add email (SMTP) setup to .env-sample and documentation - #16545

Closed
abhinav-phi wants to merge 3 commits into
laurent22:devfrom
abhinav-phi:docs/email-smtp-env-setup
Closed

Server: Fixes #16448: Add email (SMTP) setup to .env-sample and documentation#16545
abhinav-phi wants to merge 3 commits into
laurent22:devfrom
abhinav-phi:docs/email-smtp-env-setup

Conversation

@abhinav-phi

Copy link
Copy Markdown

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 by EmailService.ts / config.ts). However, none of these variables were present in the default .env-sample that 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 a conf example block and a description of each variable.

All defaults, valid values and behaviours documented were verified against env.ts (MailerSecurity enum = tls/starttls/none, defaults port 465 / security tls) and EmailService.ts (service disabled when MAILER_HOST is unset or MAILER_ENABLED is false; MAILER_NOREPLY_EMAIL required).

Note on tests

The monorepo install repeatedly failed on my Windows machine (yarn cache/link EPERM-ENOENT races), so packages/server/src/env.test.ts could not be executed locally. Since this PR changes no code (only .env-sample and 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.

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions

Copy link
Copy Markdown
Contributor

@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:

  • Desktop: Resolves #123: Added new setting to change font
  • Mobile, Desktop: Fixes #456: Fixed config screen error
  • Mobile, Desktop, Cli: Resolves #777: Improved note search performance

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.

@github-actions github-actions Bot closed this Sep 12, 2026
@abhinav-phi abhinav-phi changed the title Docs: Server: Add email (SMTP) setup to .env-sample and documentation Server: Fixes #16448: Add email (SMTP) setup to .env-sample and documentation Sep 12, 2026
@abhinav-phi

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@github-actions

Copy link
Copy Markdown
Contributor

@abhinav-phi thanks for fixing the title — this PR has been reopened.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Comment thread .env-sample Outdated
Comment thread packages/server/README.md Outdated
@joplin-coderabbit-cleanup joplin-coderabbit-cleanup Bot deleted a comment from coderabbitai Bot Sep 12, 2026
@abhinav-phi

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Sep 12, 2026
@joplin-coderabbit-cleanup joplin-coderabbit-cleanup Bot deleted a comment from coderabbitai Bot Sep 12, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@joplin-coderabbit-cleanup joplin-coderabbit-cleanup Bot deleted a comment from coderabbitai Bot Sep 12, 2026
@laurent22

Copy link
Copy Markdown
Owner

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.

@laurent22 laurent22 closed this Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server Issues related to Joplin Server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Email setup is not included in default .env file nor explained anywhere

2 participants