<h1 align="center">
    📧 EML → MBOX Converter
</h1>

<p align="center">
    <a href="#features">✨ Features</a> •
    <a href="#usage">🧰 Usage</a> •
    <a href="#license">🔑 License</a>
</p>

This Python tool converts a directory of `.eml` email files into a single `.mbox` mailbox file, suitable for import into email clients such as Mozilla Thunderbird.

Unlike simplistic converters, this script **preserves the original MIME structure** of each message. This ensures that:
- email bodies (plain text and HTML) display correctly,
- multipart messages remain intact,
- attachments and inline content are preserved,
- character encodings are handled reliably.

The converter uses Python’s standard `mailbox` module to produce **standards-compliant mbox files**, avoiding common issues such as missing message content after import.

## ✨ Features

- Converts all `.eml` files in a folder into a single `.mbox`
- Preserves full email structure (headers, MIME parts, attachments)
- Maintains compatibility with major email clients
- Robust handling of dates and sender metadata
- Simple and user-friendly CLI powered by `typer`
- Safe and deterministic processing (sorted input files)

## 🧰 Usage

```sh
eml2mbox --eml-folder FOLDER_NAME --output-mbox mailbox.mbox
```

## 🔑 License

This package is distributed under the MIT License. This license can be found online at <http://www.opensource.org/licenses/MIT>.

## Disclaimer

This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!
