Skip to content
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

SMTP emails failure #2873

Open
JulianPinzaru opened this issue Jan 15, 2025 · 1 comment
Open

SMTP emails failure #2873

JulianPinzaru opened this issue Jan 15, 2025 · 1 comment

Comments

@JulianPinzaru
Copy link

JulianPinzaru commented Jan 15, 2025

Summary: When resetting password a message shows up reading that it has reset the password but couldn't send the email due to email settings misconfiguration.

Steps to reproduce:
Using docker container, version 12.0.7
As admin, go to admin settings, find the user and click reset password.
You will see the message that reads it has reset the password but couldn't send the email due to email settings misconfiguration.
I was using google smtp but it was deprecated by google since January 2025, so I switched to using mailjet.
After configuring it locally and confirming that my keys do work, I have set necessary .env variables according to this guide. (maybe worth adding a newer guide with using mailjet instead of a deprecated gmail)

Expected behavior:
Unfortunately, it didn't succeed regardless of what I tried, also it didn't show any entries related to email sending in any of the log files under the logs directory.
The expected behavior is to see the email entries in the log files in case there is a failure and also be able to pass the .env variables for SMPT configuration.

Observed behavior:
I went ahead and started looking up for any EMAIL variables within the /opt/seafile/seafile-server-12.0.7/ directory in the docker container.
I greped for:

EMAIL_USE_TLS
EMAIL_HOST
EMAIL_HOST_USER
EMAIL_HOST_PASSWORD
EMAIL_PORT
DEFAULT_FROM_EMAIL
SERVER_EMAIL

and nothing was found within the seafile code (except the django/core itself).

Possible fixes:
I decided to give it a try and assign it directly in the settings file under /opt/seafile/seafile-server-12.0.7/seahub/seahub/settings.py to see if it will fix it. After this change and then restarting the docker containers it worked!
I then realized that these steps are described within a different guide for 12.0 where it states to do that same thing.
It feels somewhat inconvenient considering how well architectured the entire setup is and that it already relies on passing the .env variables. Also, changes in the container are not persistent...
I guess it should be an easy fix so I decided to submit this ticket.

@JulianPinzaru
Copy link
Author

P.S: I also have a subtile feeling that another issue went away after I made the emails work, but that's a pure speculation.
The notifications on my desktop app (macos) started working just fine out of nowhere. Basically, I was not able to see the confirmation dialog whenever I would set the "delete limit" to not more than 1 file (for testing purposes).
Well, I noticed that somehow after I fixed the emails it also started showing me the notifications windows, but maybe it's just a coincedence. (I saw people complaining about it though)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant