mail.login(email_username, email_password)
mail.select('Inbox')
result, data = mail.search(None, '(FROM "abc@gmail.com" SUBJECT "Hello")' )
ids = data[0]
After searching for a particular mail from mail inbox, I want to download the mail as pdf. I've looked elsewhere, but I could only find parsing mail content using get_payload() method. Is there any module in python to save the mail as we manually do by clicking on print button in gmail? Thanks all.