fixed bug when forwarding mail as .eml attachment

slight_refactoring
Sascha Rommelfangen 2017-12-19 11:28:01 +01:00
parent f9af19512b
commit e8e6abd84b
1 changed files with 2 additions and 1 deletions

View File

@ -134,6 +134,7 @@ stopword = config.stopword
hash_only_tags = config.hash_only_tags
forward_identifiers = config.forward_identifiers
attach_original_mail = config.attach_original_mail
skip_wl = config.skip_item_on_warninglist
original_email_data = email_data
@ -289,7 +290,7 @@ if stdin_used:
for part in msg.walk():
if part.get_content_maintype() == 'multipart':
continue
if part.get_content_maintype() != 'text':
if part.get_content_maintype() != 'text' and part.get_payload(decode=True) is not None:
filename = part.get_filename()
_, output_path = tempfile.mkstemp()
output = open(output_path, 'wb')