Gmail OAuth email API — send transactional emails from any hosting, no SMTP ports needed.
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.
npm install -g @talocode/maillane# 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 accountsimport { MailLaneClient } from '@talocode/maillane';
const client = new MailLaneClient({ apiKey: 'your-api-key' });
// Send an email
await client.sendEmail({
to: ['user@example.com'],
subject: 'Hello from MailLane',
text: 'This email was sent via MailLane!'
});
// Send HTML email
await client.sendEmail({
to: ['user@example.com'],
subject: 'Welcome!',
html: '<h1>Welcome!</h1><p>Your account is ready.</p>'
});
// List accounts
const accounts = await client.listAccounts();
// Get stats
const stats = await client.getStats();| 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 |
maillane mcp |
Start MCP server for AI agents |
MailLane includes an MCP server for AI agents:
maillane mcpsend_email- Send an email via Gmail OAuthlist_accounts- List connected Gmail accountsget_stats- Get sending stats for an account
MailLane provides a REST API. All requests require a TALOCODE_API_KEY.
curl -X POST https://api.talocode.site/v1/maillane/send \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": ["user@example.com"], "subject": "Hello", "text": "Test"}'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.
- talocode-maillane - Python SDK
- GitHub: https://github.com/talocode/maillane
- PyPI: https://pypi.org/project/talocode-maillane/
- YouTube Tutorial: https://www.youtube.com/watch?v=eh7qa6XdNw4
- Talocode: https://talocode.site
MIT © Talocode