Limits & Quotas

mails-agent runs on Cloudflare's free tier and uses Resend for outbound delivery. The limits below apply to the hosted service. Self-hosted deployments can adjust these values.

Sending Limits

LimitValueNotes
Sends per day (per mailbox)100Resets daily (UTC). Configurable via DAILY_SEND_LIMIT env var for self-hosted.
Recipients per email50 maxCombined to + cc + bcc

When the daily send limit is reached, POST /v1/send returns a 429 status. Self-hosted users can adjust this via the DAILY_SEND_LIMIT environment variable.

Message Size Limits

FieldLimit
Subject line998 characters (RFC 2822 line length limit)
Body (text/plain)500 KB
Body (text/html)1 MB
Attachment (per file)100 MB
Total message size100 MB (including all attachments)

Rate Limits

Per-mailbox daily send limit: default 100/day. Configurable via DAILY_SEND_LIMIT env var for self-hosted deployments. When exceeded, POST /v1/send returns 429.

Cloudflare D1 Free Tier

mails-agent stores all data in Cloudflare D1 (SQLite at the edge). The free tier limits are:

ResourceFree tier limit
Read operations5,000,000 / day
Write operations100,000 / day
Storage500 MB

For most agents, these limits are more than sufficient. A single inbox listing is 1 read operation. A single email receive is 1-3 write operations (message + FTS index + embedding). At 100K writes/day, you can receive roughly 30,000-50,000 emails per day before hitting the limit.

Other Cloudflare Free Tier Limits

ServiceFree tier limit
Workers requests100,000 / day
Workers AI inference10,000 neurons / day
Vectorize queries30,000,000 dimensions queried / month
Vectorize stored vectors5,000,000 dimensions stored
Email Routing (inbound)Unlimited

Checking Your Usage

Use the /v1/stats endpoint to check your current usage:

curl -s -H "Authorization: Bearer $API_KEY" \
  "https://mails-worker.genedai.workers.dev/v1/stats"
{
  "mailbox": "[email protected]",
  "total_emails": 1523,
  "inbound": 1200,
  "outbound": 323,
  "emails_this_month": 142
}

Increasing Limits