From: Diane Trout Date: Tue, 30 Nov 2010 19:45:47 +0000 (-0800) Subject: Add config option notification_bcc for always attaching to notify emails. X-Git-Tag: 0.5.0~7 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=a10202469e993d2d790011e459807ee70c827245 Add config option notification_bcc for always attaching to notify emails. Its called notification_bcc in the htsworkflow.ini file and NOTIFICATION_BCC in the django settings.py file. It ignores the "send bcc" option on the email_started form. --- diff --git a/htsworkflow/frontend/experiments/views.py b/htsworkflow/frontend/experiments/views.py index e2f6d88..7b6d4ba 100755 --- a/htsworkflow/frontend/experiments/views.py +++ b/htsworkflow/frontend/experiments/views.py @@ -103,6 +103,7 @@ def startedEmail(request, pk): email = EmailMessage(subject, body, sender, to=[user_email]) if bcc_managers: email.bcc = settings.MANAGERS + email.bcc.append(settings.NOTIFICATION_BCC) email.send() emails.append((user_email, subject, body, sending)) diff --git a/htsworkflow/frontend/settings.py b/htsworkflow/frontend/settings.py index 9d9e066..15b84f0 100644 --- a/htsworkflow/frontend/settings.py +++ b/htsworkflow/frontend/settings.py @@ -96,6 +96,8 @@ if options.has_option('frontend', 'notification_sender'): NOTIFICATION_SENDER = options.get('frontend', 'notification_sender') else: NOTIFICATION_SENDER = "noreply@example.com" +NOTIFICATION_BCC = [] +options_to_list(options, NOTIFICATION_BCC, 'frontend', 'notification_bcc') # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_ENGINE = options.get('frontend', 'database_engine')