-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An unknown error occurred when the SMTP host could not be reached #5195
Comments
When I enable debug mode: Symfony\Component\Mailer\Exception\TransportException PHP Version: 8.3.7 Details
|
There is no queue unless you specifically enable it, which will also require a queue worker as described in our documentation: Otherwise, errors will be thrown as experienced if the system is trying to mail but encounters errors. |
By adding QUEUE_CONNECTION=database to the .env file, the error is resolved. Emails should now be stored in the database if I'm not mistaken. I will look for a method to continuously run the Queue Worker Process in the Docker container once I have a functioning external SMTP server, as opposed to using our internal server. Thanks @ssddanbrown ! |
I just spent about an hour chasing this one down too when trying to add a new user. I had send the invitation checked, and because no smtp server is configured in the docker container its running in, I got unknown error. A better error message would be greatly appreciated because I was looking for errors to do with adding users, not email errors. |
@pnunn Yeah, I agree, this is likely to be the first use of email for many so adding extra specific handling for email errors for better guidance would probably be worthwhile here. |
Describe the Bug
Hi @ssddanbrown,
I've opted to submit a separate bug report since the same issue has arisen on both our former Bookstack server (Windows) and our current one (Linux). Errors occur when creating new pages in specific books; the pages are created, but the error remains. This issue can be replicated by changing the MAIL_HOST in the .env file to a non-existent address. It's important to note that not all books are affected by this issue. Moreover, I encounter this error even when I'm not subscribed to the book anymore. Whenever I revert the MAIL_HOST to a valid address, the problems disappear. It's probable that the issue would recur if the MAIL_HOST were unreachable at the moment of saving the page.
Please inform me if you require any information from the server logs or similar resources.
Kind regards,
Michel
Steps to Reproduce
Note: The new settings with the non-existent mail host were only applied after executing php artisan config:cache. The reason for this is unclear.
Expected Behaviour
One would expect emails to accumulate in a queue until the mail host becomes available once more.
Screenshots or Additional Context
Browser Details
Edge
Exact BookStack Version
24.05.3
The text was updated successfully, but these errors were encountered: