-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Broken email function (for registration and password reset) #113
Comments
@publicarray @Diaoul, any thoughts on the above? EDIT: I was looking at the app initialisation and we seem to be loading all the environment variables from |
Probably that's the issue indeed 😬 |
Hopefully you are able to find something. Happy to assist. |
@publicarray @Diaoul, any progress on the above? |
@Diaoul I hope you don't mind I have uploaded the config file, don't worry I made sure that there weren't any secrets in it, @mreid-tt I don't see any SMTP or similar configuration being set besides the from address. I think we don't need to send emails besides maybe a password reset. Unfortunately I also think with so many bots out there that we may get false password resets as well. https://github.com/SynoCommunity/kb/blob/main/docker-config.py#L26 |
Thanks for looking into this. From what I can tell the setup looks well structured. According to Flask-Security, we have the From the Configuring Flask-Mail docs:
So as it is, unless we are running a local mail server on 'localhost' with no security, we won't be able to send emails. For our particular config, this would depend on our email provider. Based on a lookup of the MX records for 'synocommunity.com' we seem to be using OVHcloud. Thus a sample config may look like this:
We should be able to use our existing methods of abstracting these values to functions rather than hardcoding in the config file if preferred. @publicarray, I've sent you a note on Discord related to this. EDIT: Simplified the required config above. |
Further to my initial research, I was able to test this in my demo environment successfully. I used a simple test Gmail account and was able to receive registration and password reset emails. Gmail requires two-step verification enabled on the account and a specific app password for the service (see: How to Use Your Gmail Account as Your Email Sender via SMTP). Once that initial setup was done I just added the following to my
Everything else just worked after that. As such, it should be an easy fix once we have our correct settings from our email provider verified. |
Currently, when a new administrator is registered or the reset password function is triggered an email should be sent to the user to confirm the account creation/modification. At present it appears that the mail function is broken and the following is seen:
In testing this in a dev environment, I also see the following log entries:
The text was updated successfully, but these errors were encountered: