Metadata-Version: 2.4
Name: mcs-adapter-smtp
Version: 0.1.0
Summary: SMTP adapter for the Model Context Standard.
Author-email: Danny Gerst <danny@dannygerst.de>
License-Expression: Apache-2.0
Project-URL: Homepage, https://www.modelcontextstandard.io
Project-URL: Source, https://github.com/modelcontextstandard/python-sdk
Keywords: mcs,modelcontextstandard,adapter,smtp,email
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Email
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# mcs-adapter-smtp

SMTP adapter for the **Model Context Standard (MCS)**.

Encapsulates all SMTP wire-level details (`smtplib`, MIME construction) behind
a clean adapter interface. Drivers like `mcs-driver-mailsend` delegate all
sending I/O to this adapter so they never touch `smtplib` directly.

Supports implicit SSL (port 465), STARTTLS (port 587), and plaintext (port 25).

Zero runtime dependencies -- uses only the Python standard library.

## Installation

```bash
pip install mcs-adapter-smtp
```

## Quick start

```python
from mcs.adapter.smtp import SmtpAdapter

adapter = SmtpAdapter(
    host="smtp.example.com",
    user="alice@example.com",
    password="...",
    sender_name="Alice Smith",  # optional display name
)
adapter.send_message(to="bob@example.com", subject="Hello", body="Hi Bob!")
```

## Provided methods

| Method              | Description                                      |
|---------------------|--------------------------------------------------|
| `send_message`      | Send a plain-text e-mail                         |
| `send_html_message` | Send an HTML e-mail with optional text fallback  |
| `check_connection`  | Test SMTP connectivity and authentication        |

## Links

- **Homepage:** <https://www.modelcontextstandard.io>
- **Source:** <https://github.com/modelcontextstandard/python-sdk>

## License

Apache-2.0
