Using imap-tools, it's perfectly possible to access and work with my main exchange mailbox account.
But I've got a second mailbox (it's not just a different folder within my main INBOX, but a different shared exchange mailbox, which I have access to).
from imap_tools import MailBox, AND
# get list of email subjects from INBOX folder
with MailBox('imap.mail.com').login('[email protected]', 'pwd') as mailbox:
subjects = [msg.subject for msg in mailbox.fetch()]
Is there a way to access that second shared mailbox?
As reported in this answer, getting a connection to an exchange shared mailbox is just a particular case of a regular IMAP connection. Simply open a second connection with the correct login for the shared mailbox.