Skip to content

Commit

Permalink
Option to temporary disabling email sending
Browse files Browse the repository at this point in the history
  • Loading branch information
szabozoltan69 committed Jan 21, 2025
1 parent 71bf9d4 commit 7ff5816
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions notifications/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def send_notification(subject, recipients, html, mailtype="", files=None):
SendMail(recipients, msg).start()
return

if "?" not in settings.EMAIL_API_ENDPOINT: # a.k.a dirty disabling email sending
return

to_addresses = recipients if isinstance(recipients, list) else [recipients]

# if not IS_PROD:
Expand Down

0 comments on commit 7ff5816

Please sign in to comment.