I am trying to use exchangelib in order to monitor an e-mail address from a dedicated server without requiring an instance of Outlook be installed.
import exchangelib
from exchangelib import DELEGATE, Account, Credentials, IMPERSONATION
from exchangelib.configuration import Configuration
credentials = Credentials(
username='TFAYD\\206420055',
password='boomboomboomboom'
)
config = Configuration(server='ecmail.test.com', credentials=credentials)
account = Account(
primary_smtp_address='test.test@nbcuni.com',
config=config,
autodiscover=False,
access_type=DELEGATE,
)
#print(account.folders)
#t = account.root.get_folder_by_name('\\\\Public Folders - test.test@nbcuni.com\\All Public Folders\\test\\test\\NEWS')
z = account.folders
print([t for t in z])
I've tried a few different things in order to get to a public folder that my account has access to but it continuously complains that there is no such folder with that name.
Is it possible to use exchangelib / python to interact with shared folder on exchange server? I am hoping to watch the folder with an automated process.