Questions tagged [exchangelib]

exchangelib is a Python package which provides an interface for communicating with a Microsoft Exchange 2007-2016 Server or Office365 using Exchange Web Services (EWS).

See also

235 questions
1
vote
0 answers

What is the difference between sender and author in exchangelib?

The code #!/usr/bin/env python from exchangelib import ServiceAccount, Configuration, Account, DELEGATE import os import logging from config import cfg logging.basicConfig() credentials = ServiceAccount(username=cfg['imap_user'], …
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
1
vote
0 answers

What is the difference between last_modified_time and datetime_sent of a received email?

The following code: #!/usr/bin/env python from exchangelib import ServiceAccount, Configuration, Account, DELEGATE import os import logging from config import cfg logging.basicConfig() credentials = ServiceAccount(username=cfg['imap_user'], …
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
1
vote
0 answers

Subscribing to notifications in Exchange Web Services using Python? (maybe with exchangelib?)

Is it possible to subscribe to EWS Notifications using python's exchangelib or any other library? I haven't been able to find how to do it or even if it is possible using Python. I know it is possible with PHP using the php-ews library but I rather…
Storo
  • 988
  • 1
  • 7
  • 31
1
vote
0 answers

Python/exchangelib - How to access shared public folders and calendars

How can I connect to a shared public folder using exchangelib? from exchangelib import DELEGATE, IMPERSONATION, Account, Credentials, ServiceAccount, \ EWSDateTime, EWSTimeZone, Configuration, NTLM, CalendarItem, Message, \ Mailbox,…
BryanS
  • 11
  • 6
1
vote
1 answer

Python/exchangelib - cannot establish connection

Sorry for my english not being so well: Within a windows domain I try to connect to our exchangeserver (2010/SP3) using the example given on the pypi site: from exchangelib import DELEGATE, NTLM, Account, Credentials, Configuration import os,…
Chessyman
  • 11
  • 1
  • 4
1
vote
1 answer

Using python exchangelib, how to get total size of messages in mail folder

I can iterate over all the mail folder using for item in account.root.get_folders() and if item.__class__ == exchangelib.folders.Messages: but how can I get the amount of space used by messages in that folder? I've read online from that foldersize…
Lars Nordin
  • 2,785
  • 1
  • 22
  • 25
1
vote
2 answers

Exchangelib - Monitoring an exchange server mailbox, cannot connect to shared public folder

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…
Busturdust
  • 2,447
  • 24
  • 41
1
vote
1 answer

Python - exchange server API get attendee availability

I'm using python exchangelib - Client for Microsoft Exchange Web Services (EWS) It's seems like this library did not implement the GetUserAvailabilityRequest API. I've searched all over the internet to see if someone implemented it, without any…
cheziHoyzer
  • 4,803
  • 12
  • 54
  • 81
0
votes
0 answers

exchangelib can't access inbox messages

I'm trying to use exchangelib to access my exchange account and automate some tasks. I can use my credentials to log in and send messages but I can't print inbox list. The code I'm trying to run is: from exchangelib import Credentials, Account,…
0
votes
0 answers

Invalid credentials for O365 autodiscover using exchangelib

trying to put together a simple python script to send emails from an office 365 mailbox using exchangelib, but cannot seem to get the authentication going. followed the steps in the documentation to register the app using "Delegated permissions"…
0
votes
1 answer

Get all mailboxes with Python exchangelib

I'm using Python exchangelib for loading information from Microsoft Exchange. I need to load all mailboxes from Exchange server. Can I get it with exchangelib?
0
votes
1 answer

WinError 1005 - 4 An existing connection was forcibly closed by the remote host error on downloading outlook emails via exchangelib

I'm trying to run a python script to download emails from an Outlook inbox. However, every single time on the 100th email, the connection is terminated and I get the following error: > Account ------------@------.com: Exception in _get_elements:…
0
votes
1 answer

Script raises 'TypeError: Credentials.__init__() got an unexpected keyword argument 'auth_method'

I am writing script to send email messages. Here is the main file code: import config from exchangelib import Credentials, Account, Message, Mailbox from exchangelib.errors import UnauthorizedError, TransportError credentials = Credentials( …
Face
  • 36
  • 4
0
votes
1 answer

How to make a display name for the sender in exchangelib for Python3?

I correctly send email messages with python exchangelib in this way: self.account = Account('myemail@domain.it', credentials=self.credentials, autodiscover=True) m = Message(account=self.account, folder=self.account.sent, subject=subject,…
Elisa
  • 25
  • 3
0
votes
0 answers

Problem with configuration autodiscover in exchangelib

account = common.getExchangeConnection() File "/opt/apimanagement/common.py", line 68, in getExchangeConnection account_smc = Account( File "/usr/local/lib/python3.8/dist-packages/exchangelib/account.py", line 118, in __init__ …