Tool

Extract and index email messages from mbox mailbox files

LlamaIndex reader that extracts emails from mbox mailbox files into documents.

Works with llamaindexlangchain

74
Spark score
out of 100
Updated 2 days ago
Version 0.14.23

Add to Favorites

Why it matters

Parse and load email messages stored in mbox format mailbox files into a searchable document index for retrieval-augmented generation, knowledge management, or email analysis workflows.

Outcomes

What it gets done

01

Read mbox mailbox files from a specified input directory

02

Extract individual email messages from the mbox format

03

Convert emails into structured documents for indexing

04

Load parsed email data into LlamaIndex or LangChain pipelines

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/li-reader-readers-mbox | bash

Overview

LlamaIndex Readers Integration: Mbox

Mbox Reader extracts email messages from mbox (mailbox) format files into LlamaIndex documents, given a directory containing the mbox files. Use it when you need an mbox email archive loaded into LlamaIndex documents. It reads existing mbox files, not a live email account.

What it does

Mbox Reader reads mbox (mailbox) files -- a common format for storing email messages -- and extracts the emails into documents. You point it at a directory of mbox files with load_data(input_dir=...).

When to use - and when NOT to

Use it when you need to load email messages stored in mbox format into LlamaIndex documents, for example indexing an email archive for search or analysis. It reads existing mbox files rather than connecting live to an email account, so it is not a fit if your email lives only in a live inbox with no mbox export.

Inputs and outputs

Install with:

pip install llama-index-readers-mbox

Point it at a directory containing mbox files:

from llama_index.readers.mbox import MboxReader

reader = MboxReader()

documents = reader.load_data(input_dir="<Input Directory>")

load_data takes an input_dir and returns each email in the mbox files found there as a document.

Who it's for

Developers building LlamaIndex or LangChain pipelines that need email archives exported in mbox format loaded as documents.

Source README

LlamaIndex Readers Integration: Mbox

Overview

Mbox Reader is a simple reader for mbox (mailbox) files, commonly used for storing email messages. It reads a set of emails saved in the mbox format and extracts them into documents.

Installation

You can install Mbox Reader via pip:

pip install llama-index-readers-mbox

Usage

from llama_index.readers.mbox import MboxReader

### Initialize MboxReader
reader = MboxReader()

### Load data from mbox files in the input directory
documents = reader.load_data(input_dir="<Input Directory>")

This loader is designed to be used as a way to load data into
LlamaIndex and/or subsequently
used as a Tool in a LangChain Agent.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.