-
Notifications
You must be signed in to change notification settings - Fork 50
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
Setting up email #35
Comments
does the error still occur @TryCatchCrash ? I had no problems sending mails with this config (both over the UI such as "forgot password" as within the container with "python3 manage.py sendtestemail [email protected]"
|
@rolandgeider I've just pulled fresh images and started up and I'm getting: When i checked the logs i see (domain redacted, but same in both logs) It's the same prod.env as before that worked. I'll try fixing that when i get some time and get back to you. |
Oh yes, looks like you runned into wger-project/wger#1203 Django 4 is a bit stricter with the CSRF security checkings so we must currently set the trusted domains manually. I hope we can find an easier solution in the future by setting some headers (wger-project/wger#1206) |
Added CSRF_TRUSTED_ORIGINS to prod.env and now i can login. Tried to send verification e-mail from preferences. prod.env: |
Hi hope I can help/throw a bit more info your way. I've had the same: The from email has been changed from the default [email protected] to the correct version. Using the docker version, downloaded today:
I've not really dug through the code, just a bit of grep. I can see that the environmental setting FROM_EMAIL is trying to set the from email, but I've not gone through the code to see the order in which these are called etc.
Can see that the FROM_EMAIL has tried to be set from the environmental setting, I've not looked into when this was set in relation to the verification email being called - not familiar with Django
Don't know if this helps at all. |
BTW the .tpl file is only used when calling |
Hi, I seem to be experiencing this same issue. My current mail settings (there are some extras cobbled together from bits I've found in various issues in this and the main wger repo);
And the error is;
The error is being returned by my SMTP provider so the SMTP credentials are definitely being picked up successfully, and on running;
The correct FROM_EMAIL defined in prod.env is used, the email is accepted by my SMTP provider and reaches it's destination. Exporting the FROM_EMAIL environment variable within the container also displays the correct string set in prod.env. The only thing I can think would be causing this issue is the wger settings not successfully picking up the value in FROM_EMAIL, or losing it at some point along the way as the 'sendtestemail' command seems to grab it successfully as mentioned in the original post. |
Saw what looked like it might be a typo in settings.py in another issue;
Made a copy of the file locally, removed a (maybe) erroneous 'f' and mounted within the container;
I verified this affected the file within the container, but emails sent by wger itself still fail |
I couldn't set up email too. When I was using a mail server host with subdomainname and the user I had bevor was like maybe this helpes to sort this out. I'd prefer the mail host that is not working... :( |
It seems the
FROM_EMAIL
is getting lost somewhere:Discussed in #33
Originally posted by TryCatchCrash October 23, 2022
I've set up prod.env for email (i know the settings are fine since i have a non-docker instance running and sending mails with the same settings) and it seems to ignore the FROM_EMAIL setting.
I see in the wger_server log:
smtplib.SMTPDataError: (553, b'Relaying disallowed as [email protected]')
FROM_EMAIL is set to admin@<mydomain.ext>
Am I doing something wrong or is this a bug?
The text was updated successfully, but these errors were encountered: