Send a Test Email results in 500 error if not configured correctly #1519

Closed
opened 2026-02-05 01:07:45 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @rickr on GitHub (Feb 5, 2020).

Describe the bug
When incorrectly configured the Send a Test Email returns a generic 500 error.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Ensure your email is not configured (eg set MAIL_HOST in .env to example.com)
  2. Go to 'Settings'
  3. Click on 'Maintenance'
  4. Click on 'Send A Test Email'
  5. See error

Expected behavior
A helpful toast or error page should be displayed.

In my instance I had to look at the laraval log in order to find the following log entry:
production.ERROR: Connection could not be established with host smtp.dreamhost.org

Something similar should be displayed instead of a generic 500 error.

Screenshots
N/A

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings):
    BookStack v0.28.0
  • PHP Version:
  • Hosting Method (Nginx/Apache/Docker):
    Linuxserver Docker

Additional context
N/A

Originally created by @rickr on GitHub (Feb 5, 2020). **Describe the bug** When incorrectly configured the Send a Test Email returns a generic 500 error. **Steps To Reproduce** Steps to reproduce the behavior: 1. Ensure your email is not configured (eg set MAIL_HOST in .env to example.com) 1. Go to 'Settings' 1. Click on 'Maintenance' 1. Click on 'Send A Test Email' 1. See error **Expected behavior** A helpful toast or error page should be displayed. In my instance I had to look at the laraval log in order to find the following log entry: ```production.ERROR: Connection could not be established with host smtp.dreamhost.org``` Something similar should be displayed instead of a generic 500 error. **Screenshots** N/A **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): BookStack v0.28.0 - PHP Version: - Hosting Method (Nginx/Apache/Docker): Linuxserver Docker **Additional context** N/A
OVERLORD added the 🛠️ Enhancement🏭 Back-End🔍 Pending Validation labels 2026-02-05 01:07:45 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 6, 2020):

Well I guess the feature kind of works 😅

But yeah, we should probably catch any errors off the send, if we're not doing so, and report them back. Thanks for reporting.

@ssddanbrown commented on GitHub (Feb 6, 2020): Well I guess the feature kind of works 😅 But yeah, we should probably catch any errors off the send, if we're not doing so, and report them back. Thanks for reporting.
Author
Owner

@ssddanbrown commented on GitHub (Feb 15, 2020):

Thanks again for reporting @rickr.

A fix has now been applied to be part of the next release.

@ssddanbrown commented on GitHub (Feb 15, 2020): Thanks again for reporting @rickr. A fix has now been applied to be part of the next release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1519