BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.35k stars 1.92k forks source link

SMTP Email configuration generate error #4981

Closed Thomas-Lecuppre closed 6 months ago

Thomas-Lecuppre commented 6 months ago

Attempted Debugging

Searched GitHub Issues

Describe the Scenario

I configured the SMTP email service like the docs but, when trying to send an email from the web gui, I always get the same error and no logs in laravel.log file (and yes I set the right permission to those folder as asked in docs)

Here is the error message image

Here is my config in .env file :

MAIL_DRIVER=smtp MAIL_HOST=ssl0.ovh.net MAIL_PORT=465 MAIL_USERNAME=contact@mydomain.ovh MAIL_PASSWORD=mypassword MAIL_ENCRYPTION=tls MAIL_VERIFY_SSL=true (test with and without and with true and false, changged nothing)

I also got a nextcloud app on my network that use those same credentials and I could get email from it.

image

Exact BookStack Version

24.02.3

Log Content

No log generated..

Hosting Environment

Ubuntu server 22.04.4_amd64

ssddanbrown commented 6 months ago

Hi @Thomas-Lecuppre,

Thomas-Lecuppre commented 6 months ago

Hi @ssddanbrown , thank you for your reply.

Of course my password contains specials characters (since it hasn't been mentioned in the docs that it shouldn't). When I run your command it say there is no such file or directory.

I tried to set a password with no special character and it's seems to work well. Maybe it can be mentioned in the wiki on this page :

https://www.bookstackapp.com/docs/admin/email-webhooks/

Thank you for helping.

ssddanbrown commented 6 months ago

@Thomas-Lecuppre Do the special characters used include a space and/or hash?

Thomas-Lecuppre commented 6 months ago

@ssddanbrown @, # and *

ssddanbrown commented 6 months ago

@Thomas-Lecuppre Okay, then it was likely the hash causing trouble. This is something mentioned at the top of the env file: https://github.com/BookStackApp/BookStack/blob/493d8027cd99656cdbeb92c01da99b5baa485a09/.env.example#L6-L7

Since you've managed to find and address the issue here I'll close this off.