nextcloud / nextcloud/server

[Bug]: Admin email settings: "Send test email" tests unsaved values and fails until settings are saved first

Open
#61,587 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 33-feedback bug feature: emails feature: settings papercut
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

On the admin Basic settings page (Administration settings → Basic settings → Email server),
the email/SMTP section has a "Send test e-mail" test button. When configuring SMTP for the first
time, clicking the test button before the settings are persisted makes the test run against the
old/empty configuration, so it fails — even though the entered values are correct. There is no hint
that the test uses saved values rather than the current form input. After the settings are saved, the same test succeeds.

This is confusing: it looks like the SMTP credentials are wrong when in fact only the
"save before test" ordering is the problem.

Steps to reproduce
  1. Go to Administration settings → Basic settings → Email server.
  2. Enter a fresh SMTP configuration (send mode, host, port, encryption, auth, username, app password).
  3. Immediately click Send test e-mail.
  4. The test fails / shows an error, despite correct values.
  5. Trigger a save, click Send test e-mail again → it now works.
Expected behavior

Either the test should be performed against the current form values, or the test button should be
disabled with a clear "save settings first" hint until the configuration has been persisted. At least the test button should be placed right of the save button.

Nextcloud Server version

33

Operating system

Debian/Ubuntu

PHP engine version

None

Web server

Apache (supported)

Database engine version

None

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Administration settings → Basic settings → Email server and trace the Send test e-mail action from the settings page. Reproduce the failure with unsaved SMTP values, then verify the chosen behavior: the test uses current form values or the button clearly requires saved settings. Confirm the test succeeds or the save requirement is unambiguous before marking it done.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.