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
12
votes
1 answer

exchangelib - All steps in the autodiscover protocol failed

I have a problem with using exchangelib in python. I try this example code: from exchangelib import DELEGATE, Account, Credentials creds = Credentials( username='xxxx\\username', password="mypassword" ) account = Account( …
9
votes
3 answers

Mark email as read with exchangelib

I am using Pythons exchangelib package. How can I mark an e-mail as read with exchangelib? I have had a look at the official GitHub exchangelib page for my query, but didn't find the answer.
Amit Bhat
  • 93
  • 1
  • 6
7
votes
1 answer

SSLError on exchangelib : can't connect on the server

I have a problem with exchangelib. Here is my code: creds = Credentials( username="domain_name\\username", password="password") config = Configuration(server='mail.solutec.fr', credentials=creds) account =…
Elweiss
  • 545
  • 1
  • 4
  • 12
6
votes
2 answers

python exchangelib how to get email within specific date range?

I tried to use exchangelib to extract group mailbox for analysis, and i want to extract within a date range. tried to use Filter function but seems only work for calender, may I have your advise is there any sample for email ? thanks all.
user2672033
  • 63
  • 1
  • 5
5
votes
2 answers

Exchangelib: Moving Email from Inbox to Folder

I want to read out the newest E-Mail in the inbox, select the attachment out of it and move the E-Mail to a folder. I already have a code to save the attachment: from exchangelib import Credentials, Account import os credentials =…
O. Schultz
  • 155
  • 1
  • 3
  • 12
5
votes
2 answers

How to use exchangelib to get mail for non - inbox folders

I want to get mail for non-inbox folders - how can I do this? I can get the inbox folder's emails like so: from exchangelib import DELEGATE, Account, Credentials, EWSDateTime creds = Credentials( username='xxx.test.com\test', …
王胖胖
  • 107
  • 1
  • 3
  • 10
4
votes
1 answer

Rendered HTML in email

I am attempting to send an email using exchangelib that renders html. below is my email function and body def send_email(account, subject, body, recipients): """ >>> send_email(account, 'Subject line', 'Hello!', ['info@example.com']) …
Brandon Kauffman
  • 1,515
  • 1
  • 7
  • 33
4
votes
1 answer

How to send email with Do Not Forward flag using exchangelib

This is similar to How to set/access outlook DoNotForward property in Microsoft exchange service but I want to use the exchangelib Python module to send emails.
Sakshi Gupta
  • 153
  • 8
4
votes
0 answers

Send S/MIME encrypted mails using exchangelib in Python

I'm trying to send manually encrypted S/MIME mails via the exchangelib in Python. I can send simple emails and emails with attachments. I can also manually S/MIME encrypt data with OpenSSL. I can't seem to find an option for exchangelib to encrypt…
4
votes
1 answer

Python exchangelib - mark item as read

I am trying to accomplish one task in my mailbox using Python's exchangelib module - how to move a certain email to a folder if it contains specific subject and has 'unread' status. while True: print("Checking inbox...") for msg in…
HeroicOlive
  • 300
  • 2
  • 10
4
votes
1 answer

Filter EWS mailbox by recipient address using exchangelib

I'm writing a monitoring solution using python3 with exchangelib and trying to count messages in our team's mailbox. One of the criteria: recipient list must contain specific email address. When i use filter() with author or subject arguments script…
3
votes
3 answers

exchangelib and pyinstaller - zoneinfo - tzdata - UTC issue

In my python project, I'm using exchangelib and I needed to create an exe file. Using pyinstaller --onefile I had UTC errors (in general tzdata)- "No timzone in key UTC". Simplifying all and following this…
Fabio Fracassi
  • 289
  • 3
  • 7
3
votes
1 answer

Exchange mail filter problems Python

I have a script to list emails from exchange account and it takes too long to get a response, and other times I get errors like. EXCEPTION IN (, L_203 ""): HTTPSConnectionPool(host='outlook.office365.com', port=443): Read timed…
Danilo Toro
  • 569
  • 2
  • 15
3
votes
0 answers

Exchangelib: ErrorIrresolvableConflict while modifying Email

I had to use exchangelib, to modify the subject of some of my emails. The following is the line of code that I am using to modify the email subjects. I am using App details with the exchangelib package. credentials = OAuth2Credentials(client_id="",…
3
votes
1 answer

Exchangelib on Docker with custom SSL Certificates

I've built a Fastapi web app that relies on the library exchangelib. I'm working in an internal network, where a windows IIS signed a as root the certificate of the mail server. The certificate chain is made of only 2 levels: mail server certificate…
lsabi
  • 3,641
  • 1
  • 14
  • 26
1
2 3
15 16