Fix the email debug inbox

This commit is contained in:
Christopher Allan Webber 2011-05-12 14:49:37 -05:00
parent 23d23dcf6b
commit 21919313df

View File

@ -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())