From: jordan Date: Wed, 24 Aug 2011 11:33:45 +0000 (+0000) Subject: replacing tabs with spaces from a mail patch X-Git-Tag: live~151 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/28bb6b1036f980f09b0e7c7d9516983488566e1e replacing tabs with spaces from a mail patch git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1166 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/utils/mail.py b/forum/utils/mail.py index 5f93b05..8016b00 100644 --- a/forum/utils/mail.py +++ b/forum/utils/mail.py @@ -59,8 +59,8 @@ def create_and_send_mail_messages(messages): sender = str(settings.DEFAULT_FROM_EMAIL) for recipient, subject, html, text, media in messages: - if connection is None: - connection = create_connection() + if connection is None: + connection = create_connection() msgRoot = MIMEMultipart('related') @@ -88,15 +88,15 @@ def create_and_send_mail_messages(messages): try: connection.sendmail(sender, [recipient.email], msgRoot.as_string()) - except SMTPRecipientsRefused, e: - logging.error("Email address not accepted. Exception: %s" % e) + except SMTPRecipientsRefused, e: + logging.error("Email address not accepted. Exception: %s" % e) except Exception, e: logging.error("Couldn't send mail using the sendmail method: %s" % e) - try: - connection.quit() - connection = None - except Exception: - connection = None + try: + connection.quit() + connection = None + except Exception: + connection = None try: connection.quit()