From 03d18778021c55cfb38d52d51258d671e06aeddb Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Mon, 28 Nov 2011 17:21:29 +0000 Subject: [PATCH] Interpret settings.EMAIL_COPY_TO="" as "don't send a copy" - Legacy-Id: 3717 --- ietf/utils/mail.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ietf/utils/mail.py b/ietf/utils/mail.py index 7b4da58b7..65bd54804 100644 --- a/ietf/utils/mail.py +++ b/ietf/utils/mail.py @@ -180,10 +180,10 @@ def send_mail_mime(request, to, frm, subject, msg, cc=None, extra=None, toUser=F try: copy_to = settings.EMAIL_COPY_TO except AttributeError: - copy_to = "ietf.tracker.archive+%s@gmail.com" % settings.SERVER_MODE - if bcc: - msg['X-Tracker-Bcc']=bcc - if not test_mode: # if we're running automated tests, this copy is just annoying + copy_to = "ietf.tracker.archive+%s@gmail.com" % settings.SERVER_MODE + if copy_to and not test_mode: # if we're running automated tests, this copy is just annoying + if bcc: + msg['X-Tracker-Bcc']=bcc copy_email(msg, copy_to) def send_mail_preformatted(request, preformatted):