Commits

Tay Ray Chuan committed 4872280 Merge

Merge in fix for debug email dump

Some small cleanups too.

* commit 'HEAD@{1}':
satchmo_store.mail.send_store_mail: use send_mail_args data for dump
satchmo_store.mail.send_store_mail: use docstring for email dump
satchmo_store.mail.send_store_mail: insert space between To: and recipients
satchmo_store.mail.send_store_mail: format string directly

Comments (0)

Files changed (1)

satchmo/apps/satchmo_store/mail.py

     except SocketError, e:
         if settings.DEBUG:
             log.error('Error sending mail: %s' % e)
-            log.warn('Ignoring email error, since you are running in DEBUG mode.  Email was:\nTo:%s\nSubject: %s\n---\n%s', ",".join(recipients), subject, body)
+            log.warn("""Ignoring email error, since you are running in DEBUG mode.  Email was:
+To: %s
+Subject: %s
+---
+%s""" % (",".join(send_mail_args['recipient_list']), send_mail_args['subject'], send_mail_args['message']))
         else:
             log.fatal('Error sending mail: %s' % e)
             raise IOError('Could not send email. Please make sure your email settings are correct and that you are not being blocked by your ISP.')