markup email don't require email to be multipart

This commit is contained in:
2019-10-30 15:50:45 -07:00
parent dacda64fd8
commit ee6794cf2b

View File

@ -38,11 +38,10 @@ def process_message(path):
subject = str(make_header(decode_header(msg['Subject'])))
found_pdf = False
if msg.is_multipart():
for attach in msg.walk():
if attach.get_content_type() == 'application/pdf':
found_pdf = True
for attach in msg.walk():
if attach.get_content_type() == 'application/pdf':
process_attachment(frm, subject, attach)
found_pdf = True
if not found_pdf:
reply_missing(frm, subject)