Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Discuss Data Project
Discuss Data
Commits
9c48fbd8
Commit
9c48fbd8
authored
Mar 30, 2021
by
felix.herrmann
Browse files
fix(mails): add error handling to send_update_email function
parent
af02f78a
Changes
1
Hide whitespace changes
Inline
Side-by-side
discuss_data/core/utils.py
View file @
9c48fbd8
...
...
@@ -119,11 +119,14 @@ def send_update_email(subject, message, email_to):
# message_html = render_to_string(
# "core/email.html", {"message": message, "subject": subject, "html": True, }
# )
send_mail
(
subject_prefixed
,
message_text
,
email_from
,
email_to
,
fail_silently
=
False
,
# html_message=message_html
)
try
:
send_mail
(
subject_prefixed
,
message_text
,
email_from
,
email_to
,
fail_silently
=
False
,
# html_message=message_html
)
except
Exception
as
e
:
logger
.
error
(
e
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment