mailsuite
A Python package for retrieving, parsing, and sending emails
What it is and what it does
mailsuite is a Python email abstraction layer that unifies access to multiple mailbox backends—IMAP, Microsoft Graph, Gmail, and local Maildir—under a single MailboxConnection interface. It handles the low-level complexity of each backend's quirks, folder hierarchies, authentication schemes, and protocol differences so you write email logic once and run it against any provider.
Beyond mailbox access, it provides email parsing (extracting attachments with SHA256 hashes, parsing Authentication-Results and DKIM-Signature headers), simplified message creation with attachments and HTML, DKIM signing and verification, and ARC chain sealing and verification. It supports both username/password and OAuth2 authentication, automatic IMAP reconnection, and folder operations (create, rename, move, delete) with consistent error semantics across all backends.
Use it for:
- Build a multi-provider email client or integration that works with Gmail, Microsoft 365, and IMAP servers without backend-specific code.
- Implement DKIM and ARC verification in an email security or archival system to validate sender authenticity and chain-of-custody.
- Monitor shared mailboxes across multiple cloud and on-premises systems using a single polling interface.
- Parse and extract structured data from received emails (headers, attachments, body text) with consistent handling across providers.
- Automate email-based workflows (folder watching, message filtering, forwarding) that work identically on IMAP and cloud backends.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
mailsuite retrieves, parses, and sends emails through a unified interface supporting IMAP, Microsoft Graph, Gmail, and local Maildir, with built-in DKIM and ARC signing and verification.
Yes. mailsuite is actively maintained, permissively licensed, has low install friction, and solves a real problem—unifying email access across fragmented backends. It's suitable for production use if you need multi-provider email handling or DKIM/ARC operations. The optional extras keep the base install lean. No known vulnerabilities.
Install
mailsuite on PyPI
pip
pip install mailsuiteuv
uv add mailsuitepoetry
poetry add mailsuiteInstalling mailsuite
Before you install
Low friction: pure Python wheel with 9 runtime dependencies including well-established libraries (cryptography, dnspython, imapclient). Active maintenance with a release within the last 2 months. Optional extras for Microsoft Graph and Gmail backends keep the base install lean.
License in practice
Apache-2.0 (permissive) allows commercial use, modification, and distribution with minimal restrictions, making it suitable for proprietary projects.
Quickstart
pip install mailsuite
from mailsuite.mailbox import MailboxConnection
conn = MailboxConnection('imap.example.com', 'user@example.com', 'password')
messages = conn.fetch_messages('INBOX')
Requires Python 3.9 or later. Optional: msgconvert system package for parsing Microsoft Outlook .msg files; Microsoft Graph or Gmail extras needed for those backends.
Verify before relying
- Performance characteristics when handling large mailboxes or high message volumes
- Compatibility matrix with specific Exchange/Office 365/Gmail API versions
- Whether IDLE polling refresh interval is configurable on IMAP backends
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — authres, cryptography, dkimpy, dnspython, expiringdict, html2text, imapclient, mail-parser, publicsuffix2 |
| Maintenance | actively maintained — 61 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 98,127/month — #13,104 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mailsuite-2.2.2-py3-none-any.whl
Keywords: IMAP, SMTP, email
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
dkimpyImplements DKIM (DomainKeys Identified Mail)…
permissive · top 5,000 on PyPI
IMAPClientIMAPClient provides a Pythonic interface to…
permissive · top 5,000 on PyPI
authheadersGenerates and validates email authentication…
permissive · top 15,000 on PyPI
simplegmailA Python wrapper around the Gmail API that…
permissive · top 15,000 on PyPI
mail-parserParses raw email messages into structured…
permissive · top 5,000 on PyPI
imap-toolsA high-level Python library for IMAP email…
permissive · top 15,000 on PyPI
robotframework-imaplibrary2A Robot Framework library that connects to IMAP…
permissive · top 15,000 on PyPI
emailsBuild and send HTML and plain-text emails with…
permissive · top 15,000 on PyPI
email-normalizeNormalizes email addresses by detecting the…
permissive · top 15,000 on PyPI
parsedmarcParses DMARC, TLS-RPT, and related email…
permissive · top 15,000 on PyPI