@talocode/maillane
v0.1.1
Published
Gmail OAuth email API — send transactional emails from any hosting, no SMTP ports needed. CLI, SDK, MCP server, and REST API included.
Maintainers
Readme
@talocode/maillane
Gmail OAuth email API — send transactional emails from any hosting, no SMTP ports needed.
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
npm install -g @talocode/maillaneQuick Start
CLI
# Connect your Gmail account
maillane auth
# Send an email
maillane send --to [email protected] --subject "Hello" --text "Test email"
# Check stats
maillane stats
# List accounts
maillane accountsNode.js SDK
import { MailLaneClient } from '@talocode/maillane';
const client = new MailLaneClient({ apiKey: 'your-api-key' });
// Send an email
await client.sendEmail({
to: ['[email protected]'],
subject: 'Hello from MailLane',
text: 'This email was sent via MailLane!'
});
// Send HTML email
await client.sendEmail({
to: ['[email protected]'],
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();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 |
| maillane mcp | Start MCP server for AI agents |
MCP Server
MailLane includes an MCP server for AI agents:
maillane mcpMCP Tools
send_email- Send an email via Gmail OAuthlist_accounts- List connected Gmail accountsget_stats- Get sending stats for an account
API
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": ["[email protected]"], "subject": "Hello", "text": "Test"}'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 - Python SDK
Links
- 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
License
MIT © Talocode
