How to configure SMTP? #376

Closed
opened 2026-02-04 19:13:15 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @jenniferplusplus on GitHub (Jul 19, 2017).

  • BookStack Version: 0.17.1 checkout from release branch
  • PHP Version: 5.6.30
  • MySQL Version: 5.7.18
Expected Behavior

When bookstack tries to log in to SMTP to send invitiation emails (probably others, but I haven't had cause yet) this fails silently. On the SMTP server logs I can see the failed login attempt, with apparently the password being incorrect. I've configured the username and password in .env file MAIL_USERNAME and MAIL_PASSWORD respectively.

Other applications can send and receive mail with these credentials.

The SMTP server requires ssl. Do I need to set something in MAIL_ENCRYPTION, or is there any option to configure what the authentication scheme is?

Originally created by @jenniferplusplus on GitHub (Jul 19, 2017). * BookStack Version: 0.17.1 checkout from release branch * PHP Version: 5.6.30 * MySQL Version: 5.7.18 ##### Expected Behavior When bookstack tries to log in to SMTP to send invitiation emails (probably others, but I haven't had cause yet) this fails silently. On the SMTP server logs I can see the failed login attempt, with apparently the password being incorrect. I've configured the username and password in .env file MAIL_USERNAME and MAIL_PASSWORD respectively. Other applications can send and receive mail with these credentials. The SMTP server requires ssl. Do I need to set something in MAIL_ENCRYPTION, or is there any option to configure what the authentication scheme is?
OVERLORD added the 🐕 Support label 2026-02-04 19:13:15 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jul 22, 2017):

Hi @ggellene,
For https the default MAIL_ENCRYPTION should be fine.
You should ensure you've set the following variables in the .env file:

  • MAIL_USERNAME
  • MAIL_PASSWORD
  • MAIL_HOST
  • MAIL_PORT (Defaults to 587)

That said, Since you're getting logs on your SMTP server I'd imagine you've set the above correctly.
Are there any awkward characters in your password that could be affecting the login?

@ssddanbrown commented on GitHub (Jul 22, 2017): Hi @ggellene, For https the default `MAIL_ENCRYPTION` should be fine. You should ensure you've set the following variables in the `.env` file: * `MAIL_USERNAME` * `MAIL_PASSWORD` * `MAIL_HOST` * `MAIL_PORT` (Defaults to 587) That said, Since you're getting logs on your SMTP server I'd imagine you've set the above correctly. Are there any awkward characters in your password that could be affecting the login?
Author
Owner

@predmijat commented on GitHub (Feb 21, 2018):

Hi,

I'm not able to get mail to work on sign up process...I've used installation script for Ubuntu 16.04, then edited /var/www/bookstack/config/mail.php and it still fails...Tried installing sendmail, still fails.

I've also tested installation via docker-compose, same thing - https://github.com/solidnerd/docker-bookstack/issues/22#issuecomment-367087349

It's not firewall or similar because I can send mail from terminal.

What am I missing?

@predmijat commented on GitHub (Feb 21, 2018): Hi, I'm not able to get mail to work on sign up process...I've used installation script for Ubuntu 16.04, then edited `/var/www/bookstack/config/mail.php` and it still fails...Tried installing `sendmail`, still fails. I've also tested installation via `docker-compose`, same thing - https://github.com/solidnerd/docker-bookstack/issues/22#issuecomment-367087349 It's not firewall or similar because I can send mail from terminal. What am I missing?
Author
Owner

@ssddanbrown commented on GitHub (May 12, 2018):

Thank you for opening this issue. As part of an issue clean-up we're closing off older support issues that may be outdated or irrelevant so therefore I am closing this issue.

If the issue remains and it is one you are still seeking to actively solve please ensure it is still not apparent on the latest version of BookStack then open up a new issue referencing this one.

Sorry if we were not able to solve your original request.

@ssddanbrown commented on GitHub (May 12, 2018): Thank you for opening this issue. As part of an issue clean-up we're closing off older support issues that may be outdated or irrelevant so therefore I am closing this issue. If the issue remains and it is one you are still seeking to actively solve please ensure it is still not apparent on the latest version of BookStack then open up a new issue referencing this one. Sorry if we were not able to solve your original request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#376