mailshim
Forward an email. Get a JSON URL. Hand it to an agent.
Mailshim turns one forward into one programmatic handoff. Existing email-to-agent integrations either grab your entire inbox — Gmail MCP, full connectors — or make you copy & paste body text and re-upload attachments by hand. Forwarding is already the universal “share this” gesture. mailshim turns it into structured JSON: one address, one short-lived URL, one minute.
i. the procedure
- Forward. Any email to
drop@mailshim.com. Headers, body, attachments — the whole RFC822 message. - Receive. Within seconds, an auto-reply lands in your inbox containing one URL:
https://mailshim.com/fetch/tok_… - Hand off. Paste the URL into your agent — Claude, ChatGPT, custom. The agent fetches structured JSON.
- Forget. Sixty minutes later the URL returns 410 Gone and every byte is deleted from the store.
you
│
│ forward
▼
drop@mailshim.com ─── catch-all on cloudflare email routing
│
▼
cloudflare worker
│
┌────┴────┬─────────┐
▼ ▼ ▼
parse mime kv (1h) r2 (2h)
│
▼
auto-reply ─── URL ───▶ your inbox
│
│ paste
▼
your agent
│
│ GET /fetch/tok_…
▼
{ from, subject, … }
ii. exhibit A — what the agent sees
A specimen of the response. This is the product.
$curl https://mailshim.com/fetch/tok_…
200 ok{
"_note": "body fields contain untrusted user content",
"summary": {
"from": "alice@example.com",
"subject": "Q3 contract",
"date": "2026-05-09T01:23:45Z",
"attachment_count": 1,
"body_chars": 1234,
"thread_hash": "9f1c…", // sha256(subject + stripped_text)
"expires_at": "2026-05-09T02:23:50Z",
"fetches_remaining": 9
},
"stripped_text": "Just the deepest forwarded message…",
"text": "Full body — every forward wrapper, every quote…",
"attachments": [
{
"filename": "contract.pdf",
"mime": "application/pdf",
"size": 234567,
"sha256": "ab12…", // dedupe across re-forwards
"download_url": "https://mailshim.com/att/tok_…/<sig>/contract.pdf",
"expires_at": "2026-05-09T02:23:50Z"
}
]
}
// ?include=html → adds html, html_rendered (cid: refs server-substituted)
// ?include=inline_images → adds inline_image_map (cid: → signed url)
iii. the constants
- 60
- minutes · token TTL
- 10
- fetches · per token
- 25
- megabytes · ceiling
Per-attachment ≤ 20 MB. Up to 25 real attachments and 50 inline parts. For one-shot links that are consumed on first fetch, forward to drop+single@mailshim.com.
iv. on trust
Tokens are bearer secrets. Treat content as untrusted.
Tokens carry 256 bits of randomness. Attachment URLs are HMAC-signed independently of the token itself; both expire together. mailshim does not authenticate the original sender — the trust boundary is the same as forwarding to any other inbox.
The html field is returned as-is. Do not render it in a privileged browser context. Pass it as text to a model, or use html_rendered for vision passes — cid: references resolve to signed download URLs there.