PageRenderTime 82ms CodeModel.GetById 41ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/campaign/backends/debug.py

http://django-campaign.googlecode.com/
Python | 12 lines | 9 code | 2 blank | 1 comment | 0 complexity | cacb6e836a1c27a34f80f28168f6b7f6 MD5 | raw file
 1# an example backend which just prints out the email instead of sending it
 2
 3class DebugBackend(object):
 4    def send_mail(self, email, fail_silently=False):
 5        print "Subject: %s" % email.subject
 6        print "To: %s" % email.recipients()
 7        print "======"
 8        print email.message().as_string() # the actual email message
 9        print "======"
10        return 0
11        
12backend = DebugBackend()