UPD: dav_base: tests!
This commit is contained in:
@@ -48,7 +48,7 @@ class AbstractMail(object):
|
||||
def _get_reply_to(self):
|
||||
return None
|
||||
|
||||
def send(self):
|
||||
def send(self, fail_silently=False):
|
||||
subject = self._get_subject()
|
||||
body = self._get_body()
|
||||
sender = self._get_sender()
|
||||
@@ -56,5 +56,8 @@ class AbstractMail(object):
|
||||
reply_to = self._get_reply_to()
|
||||
|
||||
email = EmailMessage(subject=subject, body=body, from_email=sender, to=recipients, reply_to=reply_to)
|
||||
logger.info(u'Send %s to %s', self.__class__.__name__, recipients)
|
||||
email.send()
|
||||
if fail_silently:
|
||||
logger.info(u'Fake sending %s to %s', self.__class__.__name__, recipients)
|
||||
else:
|
||||
logger.info(u'Send %s to %s', self.__class__.__name__, recipients)
|
||||
email.send(fail_silently=fail_silently)
|
||||
|
||||
Reference in New Issue
Block a user