Metadata-Version: 2.5
Name: mailgatewayid
Version: 0.2.0
Summary: Official zero-dependency Python SDK for MailGateway.id transactional email
Project-URL: Homepage, https://mailgateway.id
Project-URL: Documentation, https://mailgateway.id/docs
Author-email: "MailGateway.id" <support@mailgateway.id>
License: MIT
Keywords: email,mailgateway,smtp,transactional
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# mailgatewayid (Python)

Official zero-dependency Python SDK for [MailGateway.id](https://mailgateway.id). Python 3.8+.

```bash
pip install mailgatewayid
```

```python
from mailgatewayid import MailGateway, MailGatewayError

mg = MailGateway()  # reads MAILGATEWAY_API_KEY
mg.send(
    from_="NoReply <no-reply@domainanda.id>",
    to="user@example.com",
    subject="Selamat datang",
    html="<p>Halo!</p>",
    idempotency_key="invoice-INV-1001",  # optional, safe retries (24h)
)
mg.verify("user@gmail.com")
```

Webhook: `verify_webhook_signature(raw_body, request.headers["X-MailGateway-Signature"], secret)`.
Errors raise `MailGatewayError` with `.status`, `.body`, `.retry_after`.
