Skip to content

Commit

Permalink
Allow the contact email to be more configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Jul 5, 2024
1 parent e89b296 commit dfdb9d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions backend/civil_society_vote/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
EMAIL_FAIL_SILENTLY=(bool, False),
DEFAULT_FROM_EMAIL=(str, "[email protected]"),
NO_REPLY_EMAIL=(str, "[email protected]"),
# ngo hub api settings
NGOHUB_API_HOST=(str, "api-staging.ngohub.ro"),
NGOHUB_API_ACCOUNT=(str, ""),
NGOHUB_API_KEY=(str, ""),
Expand Down Expand Up @@ -425,6 +426,7 @@ def show_toolbar(request):
EMAIL_FAIL_SILENTLY = env.bool("EMAIL_FAIL_SILENTLY")

DEFAULT_FROM_EMAIL = env.str("DEFAULT_FROM_EMAIL")
CONTACT_EMAIL = env.str("CONTACT_EMAIL", default=DEFAULT_FROM_EMAIL)
NO_REPLY_EMAIL = env.str("NO_REPLY_EMAIL")

if EMAIL_BACKEND == "django_ses.SESBackend":
Expand Down
2 changes: 1 addition & 1 deletion backend/hub/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def __init__(self, *args, **kwargs):
def send_form_email(self):
send_email(
subject=f"[VotONG] Contact {self.cleaned_data.get('name')}",
to_emails=[settings.DEFAULT_FROM_EMAIL],
to_emails=[settings.CONTACT_EMAIL],
text_template="emails/06_contact.txt",
html_template="emails/06_contact.html",
context={
Expand Down

0 comments on commit dfdb9d2

Please sign in to comment.