summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
authorPatrick Maia and Victor Shyba <pixelated-team+pmaia+vshyba@thoughtworks.com>2014-11-21 19:07:27 -0300
committerPatrick Maia <pmaia@thoughtworks.com>2014-11-21 19:07:27 -0300
commit5c39786d9166d4882e787d6b80d7086c5c34e395 (patch)
tree6c114ca223c03c010e75ed46a0653c0a68951e67 /service/pixelated
parent5f39512edef09f1a6c88e73c170880761b096ba6 (diff)
for #14, properly split and strip addresses
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/adapter/mail.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/service/pixelated/adapter/mail.py b/service/pixelated/adapter/mail.py
index 5977e252..fc32366a 100644
--- a/service/pixelated/adapter/mail.py
+++ b/service/pixelated/adapter/mail.py
@@ -225,7 +225,8 @@ class PixelatedMail(Mail):
header_value = self.hdoc.content['headers'].get(header)
if not header_value:
continue
- _headers[header] = header_value if type(header_value) is list else header_value.split(', ')
+ _headers[header] = header_value if type(header_value) is list else header_value.split(',')
+ _headers[header] = map(lambda x: x.strip(), _headers[header])
for header in ['From', 'Subject']:
_headers[header] = self.hdoc.content['headers'].get(header)