Test mail works, registration confirmation mail does not work #4204

Closed
opened 2026-02-05 08:13:54 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @SirTwinkleberry on GitHub (Sep 13, 2023).

Describe the Bug

Testing out a new instance of BookStack, I setup the mail configuration as such:

MAIL_DRIVER=sendmail
MAIL_FROM_NAME="No Reply @ My BookStack"
MAIL_FROM=noreply@.

I tried the configuration using the Send Test Mail feature from the Maintenance settings.
I properly received the test mail on the gmail account of the user.
After enabling registration (and using Domain Restriction as well), I tried to setup a new user account. It did not return any error but I never received the confirmation mail that I required to activate the account.
Upon trying to login with that new account, the account is still not activated (which is expected), and I'm offered to send the mail again. Doing so does not solve the issue either.
I have checked my spam folder and other email addresses to no avail, though it should've worked regardless since the test email is successful (and does not go to the spam folder either).

Steps to Reproduce

  1. Install BookStack
  2. Configure the Mail System using the sendmail driver in the .env file
  3. Create a user account from the UI Settings using a working email
  4. Log in to that user account
  5. Use the Send a test mail from the Maintenance settings
  6. Enable registration
  7. Log out and create a new account using the registration interface
  8. Check your emails for the expected activation email

Expected Behaviour

The user created through the registration interface should receive the activation email in their mailbox.

Screenshots or Additional Context

  • How are you hosting BookStack (Docker/Nginx/Apache etc...)? Apache I think (I'm using a shared server and I have little control over these things)
  • What version of BookStack are you on (Shown in settings)? 23.08.2
  • What is your PHP version? 8.0
  • Have you set any mail settings in the .env file? yes, cf "Describe the Bug"
  • How did you install BookStack (Script / Manual / Docker file)? Manual
  • What errors, if any, are you seeing? No errors
  • When following the debug instructions, do you see anything in your log file? No log file in BookStack/storage/logs
  • Have you been making edits to the BookStack/app/Config/mail.php file? No, should I?

Browser Details

Opera and Chrome on Windows 11

Exact BookStack Version

23.08.2

Originally created by @SirTwinkleberry on GitHub (Sep 13, 2023). ### Describe the Bug Testing out a new instance of BookStack, I setup the mail configuration as such: MAIL_DRIVER=sendmail MAIL_FROM_NAME="No Reply @ My BookStack" MAIL_FROM=noreply@<mydomain>.<tld> I tried the configuration using the **Send Test Mail** feature from the Maintenance settings. I properly received the test mail on the gmail account of the user. After enabling registration (and using Domain Restriction as well), I tried to setup a new user account. It did not return any error but I never received the confirmation mail that I required to activate the account. Upon trying to login with that new account, the account is still not activated (which is expected), and I'm offered to send the mail again. Doing so does not solve the issue either. I have checked my spam folder and other email addresses to no avail, though it should've worked regardless since the test email is successful (and does not go to the spam folder either). ### Steps to Reproduce 1. Install BookStack 2. Configure the Mail System using the sendmail driver in the .env file 3. Create a user account from the UI Settings using a working email 4. Log in to that user account 5. Use the Send a test mail from the Maintenance settings 6. Enable registration 7. Log out and create a new account using the registration interface 8. Check your emails for the expected activation email ### Expected Behaviour The user created through the registration interface should receive the activation email in their mailbox. ### Screenshots or Additional Context - How are you hosting BookStack (Docker/Nginx/Apache etc...)? Apache I think (I'm using a shared server and I have little control over these things) - What version of BookStack are you on (Shown in settings)? 23.08.2 - What is your PHP version? 8.0 - Have you set any mail settings in the .env file? yes, cf "Describe the Bug" - How did you install BookStack (Script / Manual / Docker file)? Manual - What errors, if any, are you seeing? No errors - When following the debug instructions, do you see anything in your log file? No log file in BookStack/storage/logs - Have you been making edits to the BookStack/app/Config/mail.php file? No, should I? ### Browser Details Opera and Chrome on Windows 11 ### Exact BookStack Version 23.08.2
OVERLORD added the 🐛 Bug label 2026-02-05 08:13:54 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Sep 13, 2023):

Hi @Timothy-Anders0n,

  • Do you happen to have a QUEUE_CONNECTION option set in your .env file at all? If so, what is the value?
  • Do you have the ability to check the host system (which sendmail is sending the email via) mail queue/logs at all to see if/how these messages are being dealt with?
@ssddanbrown commented on GitHub (Sep 13, 2023): Hi @Timothy-Anders0n, - Do you happen to have a `QUEUE_CONNECTION` option set in your `.env` file at all? If so, what is the value? - Do you have the ability to check the host system (which sendmail is sending the email via) mail queue/logs at all to see if/how these messages are being dealt with?
Author
Owner

@SirTwinkleberry commented on GitHub (Sep 13, 2023):

Truly sorry, I indeed had a QUEUE_CONNECTION=database leftover from when I tried working the async action handling on another BookStack instance and I copy pasted its .env, changing a few values here and there but overlooked the QUEUE_CONNECTION key.

I had not realized it was still in the .env and therefore not this ticket was not a bug report but a support request in fact.
Again, truly sorry for the wasted time though I do appreciate your quick reply and ultimately, finding the solution for me.

I assume that since I had QUEUE_CONNECTION setup but that I had not run php artisan queue:work --sleep=3 --tries=3 this is why the email was not being sent. If I should try to check the mail queue/log (if it still should've worked regardless), then do say!

@SirTwinkleberry commented on GitHub (Sep 13, 2023): Truly sorry, I indeed had a `QUEUE_CONNECTION=database` leftover from when I tried working the async action handling on another BookStack instance and I copy pasted its .env, changing a few values here and there but overlooked the `QUEUE_CONNECTION` key. I had not realized it was still in the .env and therefore not this ticket was not a bug report but a support request in fact. Again, truly sorry for the wasted time though I do appreciate your quick reply and ultimately, finding the solution for me. I assume that since I had `QUEUE_CONNECTION` setup but that I had not run `php artisan queue:work --sleep=3 --tries=3` this is why the email was not being sent. If I should try to check the mail queue/log (if it still should've worked regardless), then do say!
Author
Owner

@ssddanbrown commented on GitHub (Sep 13, 2023):

@Timothy-Anders0n No worries, just happy that you've found the likely cause of issues.

@ssddanbrown commented on GitHub (Sep 13, 2023): @Timothy-Anders0n No worries, just happy that you've found the likely cause of issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4204