python-o365
python-o365 copied to clipboard
inbox.get_message() only returning very first message
`
scopes = ["mailbox"]
credentials = (config.EMAIL, config.MAIL_SECRET)
token_backend = FileSystemTokenBackend(token_filename="o365_token.txt")
class CashApp(Cog):
def __init__(self, bot):
self.bot = bot
self.account = Account(credentials, scopes=scopes, token_backend=token_backend)
async def verify_payment(self, code: str):
mailbox = self.account.mailbox()
query = mailbox.new_query().on_attribute('from').contains('[email protected]')
inbox = mailbox.inbox_folder()
for message in inbox.get_messages(limit=100, query=query):
`
for some reason it is only returning the very first email inside the inbox