Skip to content

Commit 03d1877

Browse files
committed
Interpret settings.EMAIL_COPY_TO="" as "don't send a copy"
- Legacy-Id: 3717
1 parent b114e5e commit 03d1877

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ietf/utils/mail.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ def send_mail_mime(request, to, frm, subject, msg, cc=None, extra=None, toUser=F
180180
try:
181181
copy_to = settings.EMAIL_COPY_TO
182182
except AttributeError:
183-
copy_to = "ietf.tracker.archive+%s@gmail.com" % settings.SERVER_MODE
184-
if bcc:
185-
msg['X-Tracker-Bcc']=bcc
186-
if not test_mode: # if we're running automated tests, this copy is just annoying
183+
copy_to = "ietf.tracker.archive+%s@gmail.com" % settings.SERVER_MODE
184+
if copy_to and not test_mode: # if we're running automated tests, this copy is just annoying
185+
if bcc:
186+
msg['X-Tracker-Bcc']=bcc
187187
copy_email(msg, copy_to)
188188

189189
def send_mail_preformatted(request, preformatted):

0 commit comments

Comments
 (0)