Added config option to switch off email notifications.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
# E-Mails
|
||||
ENABLE_EMAIL_NOTIFICATIONS = True
|
||||
EMAIL_SENDER = 'Jens Kleineheismann <kleineheismann@kit.edu>'
|
||||
BASE_URL = 'http://localhost:8000'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user