TekMail

THE SAFE ARCHITECTURE

Five boundaries that matter more than the model.

A capable model does not create a secure mail system by itself. Identity, enforcement, isolation, and observability have to live in infrastructure the model cannot rewrite.

  1. 1

    Give the agent its own identity

    Do not make autonomous software impersonate a person by default. A dedicated address keeps ownership, history, and revocation clear.

  2. 2

    Bind credentials to one configured agent

    The caller should not choose an arbitrary From address. Its key should select the agent, inbox, permissions, and rules on the server.

  3. 3

    Enforce outbound rules before delivery

    Apply recipient restrictions, suppressions, plan limits, content policies, and human review before a message enters the delivery queue.

  4. 4

    Treat every inbound message as untrusted

    Check authentication and risk signals, isolate attachments, and hold suspicious or consequential messages before an agent can act on them.

  5. 5

    Make retries and outcomes observable

    Use an idempotency key for each logical send, poll for replies, and retain delivery, approval, rejection, and failure status in an audit trail.

WORKING API EXAMPLES

Send once. Poll safely for replies.

Create the agent and key in the dashboard first. The same bearer token then selects that agent's sending address, permissions, rules, and isolated inbox.

Send email with an idempotency key
curl -X POST https://api.tekmail.app/api/v1/send \
  -H "Authorization: Bearer tk_your_api_key" \
  -H "Idempotency-Key: task_01K_SEND_REPORT" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "customer@example.com",
    "subject": "Your report is ready",
    "text": "I completed the requested report."
  }'
Poll the same agent's inbox
curl \
  "https://api.tekmail.app/api/v1/inbox/poll?since=2026-08-05T12:00:00.000Z" \
  -H "Authorization: Bearer tk_your_api_key"

# Read a returned message
curl \
  "https://api.tekmail.app/api/v1/inbox/in_message_id" \
  -H "Authorization: Bearer tk_your_api_key"
No inbound scanner can guarantee safety. Keep high-impact actions behind deterministic permissions and human review, even when a message passes automated checks.

CHOOSE THE RIGHT MAIL BOUNDARY

Human assistant, send-only API, or agent inbox?

NEEDHuman mailbox connectorTransactional send APIDedicated agent inbox
Best fitAssist a person in their existing mailboxApplication notifications and receiptsAutonomous software with its own identity
Inbound repliesMixed into a person's inboxOften a separate setupIsolated in the same agent identity
Credential scopeHuman account OAuthSending service credentialOne revocable key per configured agent
OversightDepends on the clientUsually application-builtMail-side policies, holds, and audit

ONE IDENTITY PER AGENT

Keep the inbox when tools and models change.

A real inbox per agent

Each configured agent receives its own address, inbound history, threads, attachments, and searchable mailbox.

One scoped credential

The key selects one agent and its From address. Rotate or revoke it without exposing a human mailbox password.

Controls outside the model

Use permissions, rate limits, policies, quarantine, and human approvals at the email boundary.

Model and client agnostic

Connect through remote MCP or REST from Codex, Claude, Kimi, OpenCode, n8n, or your own runtime.

COMMON QUESTIONS

AI agent email FAQ

How can an AI agent send email?

Create a dedicated agent in TekMail, generate that agent's API key, and call POST https://api.tekmail.app/api/v1/send with the key as a bearer token. The configured agent—not a tool argument—determines the From address and applicable rules.

How can an AI agent receive email and replies?

Each configured agent gets an isolated inbox. Its key can list GET /api/v1/inbox, poll GET /api/v1/inbox/poll?since=ISO_TIMESTAMP, and read a specific message. Held or quarantined messages stay hidden until a human releases them.

Should I give an AI agent access to my Gmail account?

A Gmail connector can make sense when an agent assists a person inside that person's mailbox. For autonomous software, a dedicated agent address and scoped credential usually create a clearer identity, smaller blast radius, and more durable audit boundary.

How do I protect an AI agent from prompt injection through email?

Treat email bodies and attachments as untrusted input. Combine sender-authentication and risk signals with deterministic permissions, quarantine, allowlists, and human approval for consequential actions. No detector is perfect, so a classifier should not be the only control.

Does TekMail work with Codex, Claude, Kimi, and OpenCode?

Yes. TekMail is model and client agnostic. A configured agent can connect through TekMail's remote MCP endpoint or REST API. Each additional email identity requires its own configured agent and scoped key.

Can every AI agent have its own email address?

Yes. TekMail provisions a separate address and inbox for each configured agent. Plans limit how many agents and billable messages an account can use, and approved custom domains are available on eligible plans.

Stop making agents borrow human inboxes.

Start with one free agent, connect through REST or MCP, and keep its identity when your tools or models change.