From c93754771a7d229e8c0ea2db79ef7f827a6a825d Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Thu, 22 Sep 2016 19:01:23 +0200
Subject: [PATCH] Add contributor-sender in cc of invitation emails

---
 scipost/utils.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scipost/utils.py b/scipost/utils.py
index 6f5995a6d..50fb68910 100644
--- a/scipost/utils.py
+++ b/scipost/utils.py
@@ -351,7 +351,8 @@ class Utils(object):
                 'SciPost: refereeing request (and registration invitation)', email_text,
                 'SciPost Registration <registration@scipost.org>',
                 [cls.invitation.email],
-                ['registration@scipost.org'],
+                cc=[cls.invitation.invited_by.user.email],
+                bcc=['registration@scipost.org'],
                 reply_to=['registration@scipost.org'])
             emailmessage.attach_alternative(html_version, 'text/html')
 
@@ -390,6 +391,7 @@ class Utils(object):
                 #'J.-S. Caux <jscaux@scipost.org>',
                 'SciPost registration <registration@scipost.org>',
                 [cls.invitation.email],
+                cc=[cls.invitation.invited_by.user.email],
                 bcc=['registration@scipost.org'],
                 reply_to=['registration@scipost.org'])
             emailmessage.attach_alternative(html_version, 'text/html')
@@ -428,6 +430,7 @@ class Utils(object):
                 #'J.-S. Caux <jscaux@scipost.org>',
                 'SciPost registration <registration@scipost.org>'
                 [cls.invitation.email],
+                cc=[cls.invitation.invited_by.user.email],
                 bcc=['registration@scipost.org'],
                 reply_to=['registration@scipost.org'])
             emailmessage.attach_alternative(html_version, 'text/html')
@@ -450,6 +453,7 @@ class Utils(object):
                 #'J.-S. Caux <jscaux@scipost.org>',
                 'SciPost registration <registration@scipost.org>',
                 [cls.invitation.email],
+                cc=[cls.invitation.invited_by.user.email],
                 bcc=['registration@scipost.org'],
                 reply_to=['registration@scipost.org'])
             emailmessage.attach_alternative(html_version, 'text/html')
@@ -609,6 +613,7 @@ class Utils(object):
                 'SciPost registration invitation', email_text,
                 'J-S Caux <jscaux@scipost.org>',
                 [cls.invitation.email],
+                cc=[cls.invitation.invited_by.user.email],
                 bcc=['registration@scipost.org'],
                 reply_to=['registration@scipost.org'])
             emailmessage.attach_alternative(html_version, 'text/html')
-- 
GitLab