Change email copy settings. Commit ready to merge.

- Legacy-Id: 19497
This commit is contained in:
Robert Sparks 2021-10-29 17:33:42 +00:00
parent 6d74a83744
commit 107b1ffdcd

View file

@ -390,7 +390,7 @@ def send_mail_mime(request, to, frm, subject, msg, cc=None, extra=None, toUser=F
try: try:
copy_to = settings.EMAIL_COPY_TO copy_to = settings.EMAIL_COPY_TO
except AttributeError: except AttributeError:
copy_to = "ietf.tracker.archive+%s@gmail.com" % settings.SERVER_MODE copy_to = None
if copy_to and (copy or not production) and not (test_mode or debugging): # if we're running automated tests, this copy is just annoying if copy_to and (copy or not production) and not (test_mode or debugging): # if we're running automated tests, this copy is just annoying
if bcc: if bcc:
msg['X-Tracker-Bcc']=bcc msg['X-Tracker-Bcc']=bcc
@ -575,7 +575,7 @@ def send_error_to_secretariat(msg):
try: try:
copy_to = settings.EMAIL_COPY_TO copy_to = settings.EMAIL_COPY_TO
except AttributeError: except AttributeError:
copy_to = "ietf.tracker.archive+%s@gmail.com" % settings.SERVER_MODE copy_to = None
if copy_to and not test_mode and not debugging: # if we're running automated tests, this copy is just annoying if copy_to and not test_mode and not debugging: # if we're running automated tests, this copy is just annoying
copy_email(msg, copy_to,originalBcc=None) copy_email(msg, copy_to,originalBcc=None)
except smtplib.SMTPException: except smtplib.SMTPException: