I am getting
AttributeError: module 'email' has no attribute 'message_from_bytes' here- i have pdf email attachements in the top 2 emails [ recently received ] top two emails have pdf attachments, but am getting AttributeError: module 'email' has no attribute 'message_from_bytes'
result, data = con.fetch(b'1', '(RFC822)')------ this is fine
raw = email.message_from_bytes(data[0][1]) after this am getting an above error
get_attachments(raw)