-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Describe the Bug
When creating a user and selecting the option to send an invitation by email, I got an error like 'An unknown error occured'.
Checking the logs, I have this :
[2022-01-17 16:54:45] production.ERROR: Expected response code 220 but got an empty response {"userId":5,"exception":"[object] (Swift_TransportException(code: 0): Expected response code 220 but got an empty response at /srv/bookstack.santepros.com/BookStack/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:447)
[stacktrace]
#0 .........
So I think my email configuration is broken right ?
But the problem is that the user was created anyway, without the assigned role/roles and without the 'user_create' log.
Maybe we could wrap this in a transaction, wdyt ?
Steps to Reproduce
- Break your bookstack email sending config
- Create a user with email invitation
- Normally you will get an error but the user is created if you look at the user list
Expected Behaviour
I think the user creation should fail entirely and maybe report a log entry with a high severity like : 'email sending failed' ?
Screenshots or Additional Context
No response
Exact BookStack Version
21.12
PHP Version
7.4
Hosting Environment
Ubuntu 20.04