Skip to content

Commit

Permalink
fixes #7 incorrect header (bcc) added to mail response
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinkuzminski committed Jan 22, 2012
1 parent 3092896 commit 7b3dcaa
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
3 changes: 0 additions & 3 deletions pyramid_mailer/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ def get_response(self):
Body=self.body,
Html=self.html)

if self.bcc:
response.base['Bcc'] = self.bcc

if self.cc:
response.base['Cc'] = self.cc

Expand Down
2 changes: 1 addition & 1 deletion pyramid_mailer/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from email.utils import parseaddr
from email.mime.base import MIMEBase

ADDRESS_HEADERS_WHITELIST = ['From', 'To', 'Delivered-To', 'Cc', 'Bcc']
ADDRESS_HEADERS_WHITELIST = ['From', 'To', 'Delivered-To', 'Cc']
DEFAULT_ENCODING = "utf-8"
VALUE_IS_EMAIL_ADDRESS = lambda v: '@' in v

Expand Down
12 changes: 0 additions & 12 deletions pyramid_mailer/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,6 @@ def test_send_without_body(self):

mailer.send(msg)

def test_bcc(self):

from pyramid_mailer.message import Message

msg = Message(subject="testing",
recipients=["to@example.com"],
body="testing",
bcc=["tosomeoneelse@example.com"])

response = msg.get_response()
self.assert_("Bcc: tosomeoneelse@example.com" in str(response))

def test_cc(self):

from pyramid_mailer.message import Message
Expand Down

0 comments on commit 7b3dcaa

Please sign in to comment.