skillfed

IMAPClient

Easy-to-use, Pythonic and complete IMAP client library

imapclient v3.1.0 2.5M downloads/30d#3,017 on PyPI561
Permissive license 3-Clause BSD License Active released

What it is and what it does

IMAPClient is a Python library that wraps the IMAP protocol, letting you connect to email servers and work with mailboxes and messages using natural Python types instead of raw IMAP commands. It handles the low-level protocol details—parsing server responses, managing message UIDs, converting time zones, and supporting internationalized mailbox names—so you can focus on application logic.

The library is designed for developers building email clients, migration tools, or automation scripts that need reliable IMAP access. It supports Python versions 3.8 through 3.13 and includes comprehensive unit and functional tests. With no external runtime dependencies and a pure-Python wheel, it installs cleanly and runs on any platform.

Use it for:

  • Build an email client or mail reader that connects to IMAP servers and displays folder contents.
  • Automate email archival or migration tasks by fetching messages from one server and moving them elsewhere.
  • Create a mail filter or rule engine that searches mailboxes and performs actions on matching messages.
  • Sync email data to a local database or search index for offline access or analytics.
  • Monitor specific mailboxes for new messages and trigger workflows or notifications.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

IMAPClient provides a Pythonic interface to IMAP servers, handling mailbox access, message retrieval, and email operations with automatic parsing of server responses and transparent UID management.

Yes. IMAPClient is production-stable, actively maintained, has zero known vulnerabilities, and installs with no friction. It's the right choice if you need to programmatically interact with IMAP servers from Python. The permissive BSD license poses no restrictions for most use cases.

Install

imapclient on PyPI

pip

pip install imapclient

uv

uv add imapclient

poetry

poetry add imapclient

Installing IMAPClient

Before you install

Low install friction; pure Python wheel with no runtime dependencies. Actively maintained with recent commits and a stable release cadence since 2013.

License in practice

3-Clause BSD License is permissive; you may use, modify, and distribute IMAPClient freely in commercial and private projects with minimal restrictions.

Quickstart

pip install imapclient

from imapclient import IMAPClient

client = IMAPClient('imap.example.com')
client.login('user@example.com', 'password')
mailbox = client.select_folder('INBOX')
messages = client.fetch(client.search(), ['BODY[]'])

Requires Python 3.8 or later; IMAP server credentials and network access needed at runtime.

Verify before relying

  • Whether the library supports OAuth2 or modern authentication beyond plain-text credentials.
  • Performance characteristics when handling mailboxes with very large message counts.
  • Whether internationalized mailbox name handling covers all IMAP server implementations.

Package facts

License 3-Clause BSD License (permissive)
Python support supports the current Python release (>=3.8.0)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 209 days since the last release
Last repo commit
First released
Downloads 2,534,744/month — #3,017 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: imapclient-3.1.0-py2.py3-none-any.whl

Keywords: imap, client, email, mail

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Communications :: Email :: Post-Office :: IMAPTopic :: InternetTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Networking

Tags

imap client library pythonemail mailbox accessimap server connectionpython email retrievalimap uid handlingmailbox management libraryimap protocol wrapper
email-protocolimap-client

More Python Modules packages