configTest.php fails depending on .env MAIL_PORT #5394

Closed
opened 2026-02-05 10:02:06 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @ramel-contria on GitHub (Aug 11, 2025).

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

Originally created by @ramel-contria on GitHub (Aug 11, 2025). ### 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
OVERLORD added the 🐛 Bug label 2026-02-05 10:02:06 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 11, 2025):

Thanks for raising @ramel-contria, have addressed in a2d13124af to be part of the next patch release.

@ssddanbrown commented on GitHub (Aug 11, 2025): Thanks for raising @ramel-contria, have addressed in a2d13124af4ea4b5b817e0604ce58bbb412be085 to be part of the next patch release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5394