Metadata-Version: 2.4
Name: talocode-maillane
Version: 0.1.1
Summary: Gmail OAuth email API — send transactional emails from any hosting, no SMTP ports needed. CLI, SDK, and REST API included.
Author: Talocode
License-Expression: MIT
Keywords: gmail,email,oauth,transactional-email,api,maillane,talocode,smtp,cli,sdk,free-hosting
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# talocode-maillane

Gmail OAuth email API — send transactional emails from any hosting, no SMTP ports needed.

[![PyPI](https://img.shields.io/pypi/v/talocode-maillane.svg)](https://pypi.org/project/talocode-maillane/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Why MailLane?

Free hosting providers (Railway, Render, Vercel) block SMTP ports 25, 465, 587. Your email libraries fail. Services like Resend require custom domain setup first.

**MailLane solves this with Gmail OAuth.** Connect your Gmail account with one click, get a REST API to send emails. No SMTP ports. No custom domain. Works from any hosting.

## Install

```bash
pip install talocode-maillane
```

## Quick Start

### CLI

```bash
# Connect your Gmail account
maillane auth

# Send an email
maillane send --to user@example.com --subject "Hello" --text "Test email"

# Check stats
maillane stats

# List accounts
maillane accounts
```

### Python SDK

```python
from maillane import MailLaneClient

client = MailLaneClient(api_key="your-api-key")

# Send an email
client.send_email(
    to=["user@example.com"],
    subject="Hello from MailLane",
    text="This email was sent via MailLane!"
)

# Send HTML email
client.send_email(
    to=["user@example.com"],
    subject="Welcome!",
    html="<h1>Welcome!</h1><p>Your account is ready.</p>"
)

# List accounts
accounts = client.list_accounts()

# Get stats
stats = client.get_stats()
```

## CLI Commands

| Command | Description |
|---------|-------------|
| `maillane auth` | Connect a Gmail account via OAuth |
| `maillane accounts` | List connected Gmail accounts |
| `maillane send` | Send an email |
| `maillane stats` | Show account sending stats |
| `maillane remove` | Remove a connected account |

## API

MailLane provides a REST API. All requests require a `TALOCODE_API_KEY`.

```python
import os
from maillane import MailLaneClient

client = MailLaneClient(
    api_key=os.environ.get("TALOCODE_API_KEY"),
    base_url="https://api.talocode.site"
)

client.send_email(
    to=["user@example.com"],
    subject="Hello",
    text="Test email"
)
```

## Pricing

MailLane uses credit-based pricing through Talocode Cloud.

| Action | Credits |
|--------|---------|
| Send text email | 2 |
| Send HTML email | 3 |
| Send with attachment | 5 |
| Connect account | Free |
| List accounts | Free |
| Get stats | Free |

**1 credit = $0.01 USD.** New projects get 100 free credits.

## Related Packages

- [@talocode/maillane](https://www.npmjs.com/package/@talocode/maillane) - Node.js SDK

## Links

- **GitHub**: https://github.com/talocode/maillane
- **npm**: https://www.npmjs.com/package/@talocode/maillane
- **YouTube Tutorial**: https://www.youtube.com/watch?v=eh7qa6XdNw4
- **Talocode**: https://talocode.site

## License

MIT © [Talocode](https://talocode.site)
