Example: Ingest .eml Files
This example shows the shortest file-based ingest path for individual .eml messages.
Use this when you have exported messages on disk, synthetic fixtures for tests, a small set of messages to inspect manually, or parser changes you want to test against known inputs.
For a full walkthrough, use Quickstart.
Before you start
Section titled “Before you start”python -m pip install mailatlasexport MAILATLAS_HOME="$PWD/.mailatlas"If you need sample fixtures:
git clone https://github.com/mailatlas/sample-data.gitIngest one .eml file
Section titled “Ingest one .eml file”mailatlas ingest sample-data/fixtures/eml/atlas-market-map.emlExpected output shape:
{ "status": "ok", "ingested_count": 1, "duplicate_count": 0, "document_refs": [ { "id": "<document-id>", "subject": "<subject>", "source_kind": "eml", "created_at": "<timestamp>" } ]}Ingest multiple .eml files
Section titled “Ingest multiple .eml files”mailatlas ingest \ sample-data/fixtures/eml/atlas-market-map.eml \ sample-data/fixtures/eml/atlas-founder-forward.emlMailAtlas stores each unique message as a document in the same workspace.
Inspect and export
Section titled “Inspect and export”mailatlas listmailatlas get <document-id>mailatlas get <document-id> --format markdown --out ./eml-example-markdownWhat this example writes
Section titled “What this example writes”MailAtlas can write raw email bytes to raw/, normalized HTML to html/, extracted inline images and attachments to assets/, metadata to store.db, and exports to the path passed with --out.