SMTPDataError at /contact/ #15258
Unanswered
iandriyanov
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This is just about what the default setting for https://docs.weblate.org/en/latest/admin/config.html#contact-form does. It just uses ADMINS_CONTACT as both from/to. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the issue
smtplib.SMTPDataError: (550, b'5.7.0 Sender address rejected: not owned by authorized user ...')
Root cause:
The error occurs because the from_email parameter in EmailMessage is set to the user’s email address from the contact form, which does not match the authorized SMTP sender address configured in settings. Yandex SMTP server rejects this sender address.
In weblate/accounts/views.py, the contact view calls EmailMessage like this (simplified):
Proposed fix:
Use the configured DEFAULT_FROM_EMAIL as from_email, and set the user email as reply_to:
This way, the SMTP sender address is authorized, and replies still go to the user's email.
I already tried
Steps to reproduce the behavior
Expected behavior
No response
Screenshots
No response
Exception traceback
How do you run Weblate?
No response
Weblate versions
No response
Weblate deploy checks
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions