Metadata-Version: 2.3
Name: mailflow
Version: 0.1.0
Summary: Async email sending, receiving, and parsing for Python applications.
Author: Matthew D. Scholefield
Author-email: Matthew D. Scholefield <matthew331199@gmail.com>
Requires-Dist: aioimaplib>=2.0.1
Requires-Dist: aiosmtplib>=5.1.0
Requires-Dist: email-reply-parser>=0.5.12
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# mailflow

Async email for Python.

Send, receive, and parse email with one simple async interface.

## Install

```bash
pip install mailflow
```

Requires Python 3.12+.

## Why mailflow?

- Send and receive email with one async client
- Works with Gmail and standard SMTP/IMAP providers
- Parse MIME messages into easy-to-use objects
- Handle replies with built-in helpers

```python
from mailflow import EmailAccount, MailClient, OutboundEmail, SearchCriteria


async def main() -> None:
    account = EmailAccount.gmail("support@example.com", password="app-password")

    async with MailClient(account) as client:
        messages = await client.fetch(SearchCriteria(unseen=True, limit=10))
        for message in messages:
            await client.reply(message, "Thanks, we are looking into this.")

        await client.send(
            OutboundEmail(
                subject="Welcome",
                text="Thanks for contacting support.",
                to=["customer@example.com"],
            )
        )
```
