The aim of this project is to simplify python mail reading using imap protocol
pip install Imap-mail-reader
from ImapMailManager import MailReader
to import the reader
reader = MailReader(Imap-server address, Usename, Token)
to instantiate the reader
reader.Connect()
to connect to the imap server using credentials
reader.getUnreadMails()
to instantiate messages attributes containing all unread mails
reader.messages
is a variable containing a list of message class
msgFrom
: string
to
: string
date
: string
attachments
: list of File
subject
: string
body
: string
htmlBody
: string
name
: string
content
: bytes
Example of usage in test.py