Add config option notification_bcc for always attaching to notify emails.
authorDiane Trout <diane@caltech.edu>
Tue, 30 Nov 2010 19:45:47 +0000 (11:45 -0800)
committerDiane Trout <diane@caltech.edu>
Tue, 30 Nov 2010 19:45:47 +0000 (11:45 -0800)
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.

htsworkflow/frontend/experiments/views.py
htsworkflow/frontend/settings.py

index e2f6d884a4d63491922f88434f9e8c40cbb1972d..7b6d4bae40a8b5886d2796a16d267d28462a473f 100755 (executable)
@@ -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))
index 9d9e066b25e79f773a437d4ce568f3ed19036189..15b84f0dc05c106038f2cb21d465951864b6fbbc 100644 (file)
@@ -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')