Skip to content

configTest.php fails depending on .env MAIL_PORT #5755

@ramel-contria

Description

@ramel-contria

Describe the Bug

In our .env file, we have our "MAIL_PORT" set to 465.
Because of that, the test test_non_null_mail_encryption_options_enforce_smtp_scheme fails (TestCase 3).
This is due to "MAIL_PORT" 465 being required to have TLS (mail.php => line 43).

Steps to Reproduce

  1. Set "MAIL_PORT" to 465 in the .env file.
  2. Run the Tests.

Expected Behaviour

Expected would be that the Test does not use the Variables from the .env file.
This can be fixed by appending the phpunit.xml with <server name="MAIL_PORT" value="587"/> or setting the "MAIL_PORT" to 587 during the test.

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v25.07

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions