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).
Questions tagged [exchangelib]
235 questions
2
votes
1 answer
Python exchangelib how to get today's unread mail list?
I'm trying to get only today's unread mail list by using Python exchanglib library.
My code is like this below:
from exchangelib import Account,Credentials
import time
def connect_mail(username, pwd, addr):
credentials =…

ShinNShirley
- 368
- 2
- 17
2
votes
1 answer
Add a new delegate for an Exchange account through python and EWS
I'm working with exchangelib to get a list of delegates assigned to an exchange account and it is working properly. However what I'm trying to do now is to add a new delegate to the same exchange account, but I'm not sure if exchangelib provide this…

juancayuso
- 21
- 2
2
votes
1 answer
How to check number of attachments in email?
I'm working with exchangelib and python3 to manage an Exchange mailbox, so far my code works ok, but I wanted to check how many attachments an email has before to go forward.
This is what I have so far:
def send_email(account, subject, body,…

Sallyerik
- 489
- 2
- 11
- 24
2
votes
2 answers
Python - multiprocessing issue with AWS Lambda and exchangelib
I have an issue when using my code deployed on an AWS Lambda function using exchangelib library. My code works very well locally.
What could be the reason ?
From what I understand it looks to be to multiprocessing which wouldn't be handled in AWS…

yeye
- 503
- 4
- 19
2
votes
2 answers
Change sender account using exchangelib
I have two accounts on outlook 'user1@example.com' and 'user2@example.com'. I have a number of drafts in the user1 draft folder and want to update each email to the user2 address before sending them so that user2 is the sender of the emails and…

Timo
- 21
- 4
2
votes
0 answers
Python/exchangelib: how to search contact within the Address Book
I am using exchangelib to script over my exchange email service. I can search email within various folders. I can search contact within some contact folders as well. However, I cannot find a way to search contact over the full Active Directory or…

nngeek
- 1,912
- 16
- 24
2
votes
1 answer
How to save email messge item generated using exchangelib library in python
I have used exchangelib library to download emails from my Inbox.
The messages are eventually instance of exchangelib.items.Message.
I want to save this entire email as .msg file so that I can later attach it to some the application.
Can someone…

pbdscoder
- 33
- 4
2
votes
1 answer
Exchangelib close connection
I want to know if there's a way to close the connection with exchangelib.
Here is my function for setup and connection; I need to define a close_conection() function, but haven't found anything reading the documentation.
class Exchange:
def…

Jules Bogado
- 23
- 7
2
votes
1 answer
exchangelib suddenly throws ErrorAccessDenied, but credentials are still valid
The title pretty much says it all. I was able to access my Exchange server using the following method:
credentials = Credentials(
username='DOMAIN\\username',
password='PASSWORD')
exchange_account = Account(
…

John Marion
- 165
- 1
- 12
2
votes
1 answer
python send mail by ms exchange server behind proxy
For my machine, after logging in the windows system, the outlook logon automatically with Anonymous Authentication.
The outlook connects to Microsoft Exchange using HTTP, and connects using SSL only.
The Microsoft Exchange server…

Warmer
- 107
- 1
- 7
2
votes
0 answers
smtplib/exchangelib connection to the email server error
I used to use auto discover to retrieve some emails from my inbox using exchangelib. However, last week they updated my email and auto discover is not working anymore. Now I am testing the connection with SMTPLIB using SMTP_SSL
server =…

Santiago
- 57
- 1
- 6
2
votes
0 answers
How can I avoid users having to reenter their password when signed in to o365?
I am building a webapp with Django which allows our users to create a meeting in their office365 calendar while also storing the meeting in a database so we can display some information about it on a screen in the office.
I am using exchangelib to…

SJ_WTF
- 52
- 7
2
votes
1 answer
Python: Function hangs in child process
I wrote this script which uses the exchangelib python API to log into my Microsoft exchange account and download sent messages that contain a particular subject.
I split it into two functions each running as a seperate process:
Function A fetches…

pythoncoder
- 51
- 2
- 5
2
votes
0 answers
Exchangelib: Can't connect to server
so recently I tried myself with Exchangelib, but I currently can't solve the issue. Heres my code:
from exchangelib import DELEGATE, Account, Credentials, IMPERSONATION
from exchangelib.configuration import Configuration
config =…

croveans
- 21
- 2
2
votes
2 answers
exchangelib KeyError: 'contacts' or KeyError: 'inbox' or
I want to search in contact list of some account and get that contacts details back, but none of folders that told here not work because of KeyError exception .
Somehow i can't access to any of exchange account folders.
Is it permission or ...…

alireza
- 1,173
- 4
- 19
- 40