Hi apoorv,
I faced similar error where the email was sent but the data fetched was somehow wrong due to the quoted printed encoding format.
Can you quickly check you email's encoding format? What happens is imap by default expects all the emails to be encoded in quoted printable format. But problem arises when your mail is encoded in some other format.
If that is the case you need to bypass forced decoding of email from quoted printable.
For bypassing you need to download the imap's source code in you local and use it as a python library file. Then comment the line where its decoding and then try.
I understand your issue is related to python 3 version but try this once and let me know, it should work.