I was wondering is there a way to get all unreaded email using Python?
I searched here but all I found was this,
but I didn't understand answers.
Could we use imap4 for this?
All I could done was using
import imaplib
mailserver=imaplib.IMAP4.SSL('imap-mail.outlook.com:993')
mailserver.login('somthing','somthing')
status, count=mailserver.select('inbox')
status, data=mailserver.fetch(count[0], '(UID BODY[TEXT])')
print (data[0][1])
mailserver.close()
mailserver.logout()
and fetch the last email fron inbox like all of the tutorials shows