Skip to content

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

Description

@634-5789

⚠️ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap33-feedbackbug

    Type

    No fields configured for Bug.

    Projects

    Status
    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions