Added config option to switch off email notifications.

This commit is contained in:
2018-01-23 20:07:36 +01:00
parent 1675878595
commit 7de503f91e
2 changed files with 3 additions and 0 deletions

View File

@@ -49,6 +49,8 @@ class AbstractMail(object):
raise NotImplementedError()
def send(self):
if not config.ENABLE_EMAIL_NOTIFICATIONS:
return None
subject = self._get_subject()
body = self._get_body()
sender = self._sender