You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ietf/utils/mail.py
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ def send_smtp(msg, bcc=None):
93
93
server.quit()
94
94
log("sent email from '%s' to %s subject '%s'"% (frm, to, msg.get('Subject', '[no subject]')))
95
95
96
-
defcopy_email(msg, to, toUser=False):
96
+
defcopy_email(msg, to, toUser=False, originalBcc=None):
97
97
'''
98
98
Send a copy of the given email message to the given recipient.
99
99
'''
@@ -111,6 +111,8 @@ def copy_email(msg, to, toUser=False):
111
111
explanation="The attached message was generated by an instance of the tracker\nin test mode. It is being sent to you because you, or someone acting\non your behalf, is testing the system. If you do not recognize\nthis action, please accept our apologies and do not be concerned as\nthe action is being taken in a test context."
112
112
else:
113
113
explanation="The attached message would have been sent, but the tracker is in %s mode.\nIt was not sent to anybody."%settings.SERVER_MODE
114
+
iforiginalBcc:
115
+
explanation+= ("\nIn addition to the destinations derived from the header below, the message would have been sent Bcc to %s"%originalBcc)
114
116
new.attach(MIMEText(explanation+"\n\n"))
115
117
new.attach(MIMEMessage(msg))
116
118
# Overwrite the From: header, so that the copy from a development or
0 commit comments