IMAPClient aims to be a easy-to-use, Pythonic and complete IMAP client library with no dependencies outside the Python standard library.
Questions tagged [imapclient]
68 questions
8
votes
6 answers
pip install pyzmail ERROR message
I use Python 3.5.2.
I installed imapclient with no problem pip install imapclient. However when I tried to install pyzmail, pip install pyzmail, I received error message below:
ImportError: No module named '_markerlib'
…

Johnseito
- 315
- 1
- 9
- 24
6
votes
2 answers
imapclient error on Windows
Environment that I'm having trouble on: Python 2.7.11 on Windows10 (patched up to date). Python installed via a msi. I've checked PATH settings in settings, and it's set to c:\Python27.
This works on Mac:
from imapclient import…

paul_h
- 1,859
- 3
- 19
- 27
4
votes
1 answer
Python IMAP - rendering message bodies with embedded inline images
I am working on my own email client (powered by Django 1.10 and Python 3).
Currently, I am trying to render inbox messages using python's IMAPClient library. It looks like I succeeded in parsing emails with mixed and alternative subtypes, but now I…

Edgar Navasardyan
- 4,261
- 8
- 58
- 121
3
votes
2 answers
Python email bot Pyzmail/IMAPclient error
So I'm working on a Python script to extract text from an email and following these instructions to do so. This is the script thus far:
import imapclient
import pprint
import pyzmail
mymail = "my@email.com"
password = input("Password: ")
imapObj =…

Captainbob
- 31
- 3
3
votes
0 answers
Python IMAPClient - how to group conversations from inbox/sent folders?
I was able to group conversations for inbox for exmaple with:
from imapclient import IMAPClient
mail = IMAPClient(domain, ssl=True)
mail.login(username+"@"+domain, password)
mail.select_folder(folder)
threads = mail.thread(algorithm='REFERENCES',…

pregmatch
- 2,629
- 6
- 31
- 68
3
votes
1 answer
read body of email using imapclient in python
I am trying to view the actual body of an email. So far, I can view the subject, or any other headers, but I can't find a way to read just the body without extra stuff.
from imapclient import IMAPClient
import email
host = 'imap.gmail.com'
user =…

cattrain
- 33
- 1
- 3
2
votes
3 answers
How to convert a byte like string to normal bytes?
I've a problem during exception-handling with the imapclient-library.
I tried to handle the LoginError like this:
source = IMAPClient(host=args.source_server, port=args.source_port, ssl=not args.source_no_ssl)
try:
print('Login…

Lukas
- 43
- 4
2
votes
1 answer
Get content of a mail IMAPCLIENT
I am using the IMAPclient to get the content of emails, so i made this piece of code :
messages = server.search(['FROM', user['email']], charset='UTF-8')
if len(messages) > 0:
for mail_id, data in server.fetch(messages, ['ENVELOPE']).items():
…

asa
- 531
- 1
- 5
- 20
2
votes
2 answers
Python imapclient search using multiple operands
I am using Python's imapclient, and I need to be able to search on multiple operands. For example, let's say that I want to see messages sent on Jan 6, 2018 or on Jan 13, 2018. I've looked at IMAP criteria with multiple ORs and at…

catdude
- 33
- 1
- 7
2
votes
2 answers
imapClient error (diff version python and windows)
This question was asked by paul_h, but I'm too new to comment with (hopefully) relevant information. I'm having the same problem with imapClient, and it's obviously not Python/Windows version specific. Paul H is running Python 2.7.11 on win 10.…

Llamafu
- 21
- 5
2
votes
0 answers
AssertionError during idle_check in IMAPClient
I am attempting to have a python script that constantly monitors a gmail account for new emails. Using IMAPClient, it opens two imap connections, one in idle mode. Whenever a new message is received, the connection in idle mode tells the other…

Eldritch Cheese
- 1,177
- 11
- 21
2
votes
2 answers
A socket operation was attempted to an unreachable network [2a00:1450:4013:c01::6d]:993 when receiving Gmail email with S22 ImapClient
I'm trying to receive email from Gmail. Occaisionly (approx 1 out of 5 times) I get a System.Net.Sockets.SocketException, error message:
A socket operation was attempted to an unreachable network [2a00:1450:4013:c01::6d]:993
The network address is…

RHAD
- 1,317
- 3
- 13
- 37
1
vote
1 answer
Office365 IMAP sometimes fetching new emails not working
I connect to outlook.office365.com for synchronizing emails by library IMAPClient (Python). By IDLE mechanizm I receive changes on server for example new email in folder INBOX. After that I fetch for mails with UID {last_synced_uid}:* - this should…

wciurzynski
- 11
- 2
1
vote
2 answers
Can't locate object method "new" via package "IO::Socket::SSL" (perhaps you forgot to load "IO::Socket::SSL"?)
We are using Perl 5, version 18, subversion 1 (v5.18.1) built.
Earlier we were connecting outlook 2007 to connect through Mail::IMAPClient Module using user and password as it wasn't required to use SSL or TLS. Now we have migrated outlook to 2016,…

Deepak
- 11
- 2
1
vote
1 answer
Trying to mass delete emails using Python 3.7.2 & IMAPClient - imaplib.IMAP4.error: UID command error: BAD [b'Command line too large']
I'm very new to programming so I'm looking for some help here. I have an email folder that has over 200k emails. I am trying to delete them all because they're slowing me down. I wrote a script in Python 3.7.2 using IMAPClient to try and delete them…

golftech
- 11
- 1