skillfed

mailsuite

A Python package for retrieving, parsing, and sending emails

mailsuite v2.2.2 98.1K downloads/30d#13,104 on PyPI11
Permissive license Apache-2.0 Active released

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 mailsuite

uv

uv add mailsuite

poetry

poetry add mailsuite

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

email retrieval and parsing libraryIMAP SMTP client abstractionDKIM signing verificationMicrosoft Graph Gmail IMAPemail folder managementARC authentication chainmailbox connection abstraction
email-abstractiondkim-arcmulti-provider

More Internet packages