aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/util.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-05-12 14:49:37 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-05-12 14:51:45 -0500
commit21919313dfc18c9f9303cbbb2591c0410379f768 (patch)
tree26b055a16619239f967f8d58840b91eef5c44600 /mediagoblin/util.py
parent23d23dcf6bbf136eed0759515da73eff08dd328f (diff)
downloadmediagoblin-21919313dfc18c9f9303cbbb2591c0410379f768.tar.lz
mediagoblin-21919313dfc18c9f9303cbbb2591c0410379f768.tar.xz
mediagoblin-21919313dfc18c9f9303cbbb2591c0410379f768.zip
Fix the email debug inbox
Diffstat (limited to 'mediagoblin/util.py')
-rw-r--r--mediagoblin/util.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/mediagoblin/util.py b/mediagoblin/util.py
index 63f0f9c5..946216ba 100644
--- a/mediagoblin/util.py
+++ b/mediagoblin/util.py
@@ -172,7 +172,7 @@ def send_email(from_addr, to_addrs, subject, message_body):
if TESTS_ENABLED:
EMAIL_TEST_INBOX.append(message)
- elif mgoblin_globals.email_debug_mode:
+ if getattr(mgoblin_globals, 'email_debug_mode', False):
print u"===== Email ====="
print u"From address: %s" % message['From']
print u"To addresses: %s" % message['To']
@@ -180,6 +180,4 @@ def send_email(from_addr, to_addrs, subject, message_body):
print u"-- Body: --"
print message.get_payload(decode=True)
- else:
- return mhost.sendmail(from_addr, to_addrs, message.as_string())
-
+ return mhost.sendmail(from_addr, to_addrs, message.as_string())