/campaign/backends/debug.py
Python | 12 lines | 9 code | 2 blank | 1 comment | 0 complexity | cacb6e836a1c27a34f80f28168f6b7f6 MD5 | raw file
Possible License(s): BSD-3-Clause
- # an example backend which just prints out the email instead of sending it
- class DebugBackend(object):
- def send_mail(self, email, fail_silently=False):
- print "Subject: %s" % email.subject
- print "To: %s" % email.recipients()
- print "======"
- print email.message().as_string() # the actual email message
- print "======"
- return 0
-
- backend = DebugBackend()