Adding bcc to all emails sent

This commit is contained in:
Carlos Lopez 2020-06-08 11:17:17 -06:00
parent f91fbf76b9
commit 0351b3548a
1 changed files with 12 additions and 6 deletions

View File

@ -10,7 +10,8 @@ def send_ramp_up_submission_email(sender, recipients, approver_1, approver_2=Non
try: try:
msg = Message('Research Ramp-up Plan Submitted', msg = Message('Research Ramp-up Plan Submitted',
sender=sender, sender=sender,
recipients=recipients) recipients=recipients,
bcc=['rrt_emails@googlegroups.com'])
from crc import env, mail from crc import env, mail
template = env.get_template('ramp_up_submission.txt') template = env.get_template('ramp_up_submission.txt')
@ -27,7 +28,8 @@ def send_ramp_up_approval_request_email(sender, recipients, primary_investigator
try: try:
msg = Message('Research Ramp-up Plan Approval Request', msg = Message('Research Ramp-up Plan Approval Request',
sender=sender, sender=sender,
recipients=recipients) recipients=recipients,
bcc=['rrt_emails@googlegroups.com'])
from crc import env, mail from crc import env, mail
template = env.get_template('ramp_up_approval_request.txt') template = env.get_template('ramp_up_approval_request.txt')
@ -44,7 +46,8 @@ def send_ramp_up_approval_request_first_review_email(sender, recipients, primary
try: try:
msg = Message('Research Ramp-up Plan Approval Request', msg = Message('Research Ramp-up Plan Approval Request',
sender=sender, sender=sender,
recipients=recipients) recipients=recipients,
bcc=['rrt_emails@googlegroups.com'])
from crc import env, mail from crc import env, mail
template = env.get_template('ramp_up_approval_request_first_review.txt') template = env.get_template('ramp_up_approval_request_first_review.txt')
@ -61,7 +64,8 @@ def send_ramp_up_approved_email(sender, recipients, approver_1, approver_2=None)
try: try:
msg = Message('Research Ramp-up Plan Approved', msg = Message('Research Ramp-up Plan Approved',
sender=sender, sender=sender,
recipients=recipients) recipients=recipients,
bcc=['rrt_emails@googlegroups.com'])
from crc import env, mail from crc import env, mail
template = env.get_template('ramp_up_approved.txt') template = env.get_template('ramp_up_approved.txt')
@ -78,7 +82,8 @@ def send_ramp_up_denied_email(sender, recipients, approver):
try: try:
msg = Message('Research Ramp-up Plan Denied', msg = Message('Research Ramp-up Plan Denied',
sender=sender, sender=sender,
recipients=recipients) recipients=recipients,
bcc=['rrt_emails@googlegroups.com'])
from crc import env, mail from crc import env, mail
template = env.get_template('ramp_up_denied.txt') template = env.get_template('ramp_up_denied.txt')
@ -95,7 +100,8 @@ def send_ramp_up_denied_email_to_approver(sender, recipients, primary_investigat
try: try:
msg = Message('Research Ramp-up Plan Denied', msg = Message('Research Ramp-up Plan Denied',
sender=sender, sender=sender,
recipients=recipients) recipients=recipients,
bcc=['rrt_emails@googlegroups.com'])
from crc import env, mail from crc import env, mail
template = env.get_template('ramp_up_denied_first_approver.txt') template = env.get_template('ramp_up_denied_first_approver.txt')