markup email don't require email to be multipart
This commit is contained in:
@ -38,11 +38,10 @@ def process_message(path):
|
|||||||
subject = str(make_header(decode_header(msg['Subject'])))
|
subject = str(make_header(decode_header(msg['Subject'])))
|
||||||
|
|
||||||
found_pdf = False
|
found_pdf = False
|
||||||
if msg.is_multipart():
|
|
||||||
for attach in msg.walk():
|
for attach in msg.walk():
|
||||||
if attach.get_content_type() == 'application/pdf':
|
if attach.get_content_type() == 'application/pdf':
|
||||||
found_pdf = True
|
|
||||||
process_attachment(frm, subject, attach)
|
process_attachment(frm, subject, attach)
|
||||||
|
found_pdf = True
|
||||||
|
|
||||||
if not found_pdf:
|
if not found_pdf:
|
||||||
reply_missing(frm, subject)
|
reply_missing(frm, subject)
|
||||||
|
|||||||
Reference in New Issue
Block a user