Skip to content

MailAtlas Docs

MailAtlas makes email accessible to AI agents. It imports email from live mailboxes or archives, turns complex messages into clean source-linked views, and gives agents a queryable email workspace for reading, exporting, and sending.

MailAtlas is currently alpha. Expect CLI, schema, and packaging details to keep improving as the project matures.

Start with the source you already have. Live mailboxes, individual email files, and mailbox archives all write to the same email workspace.

Install MailAtlas from PyPI, then choose the source you want to connect or import.

Terminal window
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install mailatlas

For a quick local check, import one sample email file:

Terminal window
git clone https://github.com/mailatlas/sample-data.git
export MAILATLAS_HOME="$PWD/.mailatlas"
mailatlas ingest sample-data/fixtures/eml/atlas-market-map.eml
mailatlas list

MailAtlas handles MIME structure, HTML, attachments, embedded images, metadata, and provenance so your agent can work with clean email views without losing the original source context.

  • receiveFetch Gmail or IMAP messages from a live mailbox and store clean source-linked documents locally.
  • ingestImport .eml files or an mbox archive from disk.
  • readUse mailatlas list and mailatlas get to find, inspect, and query stored email.
  • exportWrite JSON, Markdown, HTML, or PDF views from stored messages while keeping assets and source links connected.
  • sendSend through SMTP, Cloudflare, or Gmail and store sent messages in the same email workspace.

MailAtlas stores email in a workspace your agent can query. Each message keeps its clean text, HTML view, attachments, embedded images, metadata, exports, and source reference together, so the agent can read the clean version and still trace back to the original email when needed.

.eml

A single email message file on disk.

mbox

A mailbox file on disk that can contain many messages.

Email workspace

The local copy of received and sent email that your agent can query, inspect, and export.

Document

The clean, structured MailAtlas record created from one email message.

Source email

The original message MailAtlas keeps linked to cleaned text, HTML, assets, metadata, and exports.

Asset

An inline image or regular file attachment extracted from a message and linked to a document.

Provider

The mailbox or sending service MailAtlas connects to, such as IMAP, Gmail, SMTP, or Cloudflare.

Export

A derived JSON, Markdown, HTML, or PDF artifact written from a stored document.

Sent message

A message MailAtlas rendered and sent through a configured provider, stored in the same email workspace as received email.

New users should start with Installation. Then use Manual IMAP Sync for a live mailbox or Quickstart for sample email files. After that, use Outbound Email, Python API, or MCP Server depending on how your agent will use MailAtlas.