Fix syntax error

This commit is contained in:
László Károlyi 2019-01-15 17:33:35 +01:00
parent 229bc2ca76
commit d5275e28e0
Signed by: karolyi
GPG key ID: 2DCAF25E55735BFE

View file

@ -34,7 +34,7 @@ original_headers = Parser().parsestr(input_decoded)
# with open('email1.txt') as fp:
# original_headers = Parser().parsestr(fp.read())
recipient_address = parseaddr(original_headers['From'])[1]
recipient_address = parseaddr(original_headers['From'])[1] \
if not parseaddr(original_headers['From'])[1].endswith('@linkedin.com') \
else parseaddr(original_headers['Reply-To'])[1]
sender_address = parseaddr(original_headers['To'])[1]