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
| Limit | Value | Notes |
|---|---|---|
| Sends per day (per mailbox) | 100 | Resets daily (UTC). Configurable via DAILY_SEND_LIMIT env var for self-hosted. |
| Recipients per email | 50 max | Combined 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
| Field | Limit |
|---|---|
| Subject line | 998 characters (RFC 2822 line length limit) |
| Body (text/plain) | 500 KB |
| Body (text/html) | 1 MB |
| Attachment (per file) | 100 MB |
| Total message size | 100 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:
| Resource | Free tier limit |
|---|---|
| Read operations | 5,000,000 / day |
| Write operations | 100,000 / day |
| Storage | 500 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
| Service | Free tier limit |
|---|---|
| Workers requests | 100,000 / day |
| Workers AI inference | 10,000 neurons / day |
| Vectorize queries | 30,000,000 dimensions queried / month |
| Vectorize stored vectors | 5,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
- Self-host: Deploy your own mails-agent Worker and remove or increase all limits. See the Self-Hosting guide.
- Cloudflare paid plan: Upgrade your Cloudflare account to increase D1, Workers, and AI limits.
- Resend paid plan: Upgrade your Resend account to send more than 100 emails/day (Resend free tier allows 100/day and 3,000/month).