summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
authorJefferson Stachelski <jstachel@thoughtworks.com>2015-11-25 18:04:03 -0200
committerJefferson Stachelski <jstachel@thoughtworks.com>2015-11-25 18:04:03 -0200
commit811aa0b5850344f65e0b16831f537143a5c461ad (patch)
tree1cd70ee45ae861bb43c5a47a6e67169438e26900 /service/pixelated
parent005eceda8ca1185514aa19182fb179eecca735e2 (diff)
Issue #515 - Removed the Bcc when sending email
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/adapter/services/mail_sender.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/service/pixelated/adapter/services/mail_sender.py b/service/pixelated/adapter/services/mail_sender.py
index bcbf331c..acd9f034 100644
--- a/service/pixelated/adapter/services/mail_sender.py
+++ b/service/pixelated/adapter/services/mail_sender.py
@@ -60,9 +60,15 @@ class MailSender(object):
def _send_mail_to_all_recipients(self, mail, recipients):
outgoing_mail = self._create_outgoing_mail()
+ bccs = mail.bcc
deferreds = []
for recipient in recipients:
+ if recipient in bccs:
+ mail.headers['Bcc'] = [recipient]
+ else:
+ mail.headers['Bcc'] = []
+
smtp_recipient = self._create_twisted_smtp_recipient(recipient)
deferreds.append(outgoing_mail.send_message(mail.to_smtp_format(), smtp_recipient))