# Send & Receive Emails with Replit (/integrations/frameworks/replit)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 635 · updated: 2026-09-06 -->
Related: [Send & Receive Emails with Claude Cowork](/integrations/frameworks/claude-cowork.md), [Send & Receive Emails with Claude Code](/integrations/frameworks/claude-code.md), [Send & Receive Emails with OpenAI Codex](/integrations/frameworks/codex.md), [Send & Receive Emails with OpenClaw](/integrations/frameworks/openclaw.md), [Send & Receive Emails with Grok](/integrations/frameworks/grok.md), [Send & Receive Emails with Manus](/integrations/frameworks/manus.md)



# Connect AgentMail to Replit

Enable the AgentMail integration in Replit and the apps and agents you build get `@agentmail.to` inboxes to send, receive, and reply from. Authentication is an AgentMail API key stored by Replit.

## Do this

1. In Replit, open **Settings > Integrations** and search `AgentMail`. Connect one of two ways:
   * **API key**: enable the **AgentMail** integration, paste a key from `https://console.agentmail.to/dashboard/api-keys`, and click **Configure**.
   * **OAuth**: choose the **MCP** option and sign in to AgentMail. No API key.
2. In a chat, prompt:

```text
Create an AgentMail inbox and send a hi email from it to you@example.com.
```

## Facts

* Two connection paths from **Settings > Integrations**: the **AgentMail** integration authenticates with an API key (keys are prefixed `am_`, sent as a bearer token), while the **MCP** option authenticates with an OAuth sign-in and needs no key.
* Replit stores the credential with the integration, so it stays out of your app's code.
* Once configured, the connector is available to the apps and agents you build on Replit.
* Creating an inbox without a username lets AgentMail generate an available one. A taken username makes `create_inbox` return `403` with up to 3 available variants in `suggestions`.

## Not supported

* The API-key integration needs a valid key to authenticate. To connect without a key, use the MCP option and its OAuth sign-in instead.

## Errors

| Error            | Status | Cause                                                                   | Fix                                                                 |
| ---------------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `resource_taken` | 403    | The requested inbox username belongs to another organization            | Retry with one of the up to 3 variants in `suggestions`             |
| `already_exists` | 403    | An inbox with the requested username already exists in the organization | Retry with a username from `suggestions`, or use the existing inbox |

## Verify

Ask a Replit chat to create an inbox and send a test email. Success is the app reporting a new `@agentmail.to` address with the email delivered.

## Related

* [Custom domains](/advanced/custom-domains): an address on your own domain instead of `@agentmail.to`.
* [Agent safety](/advanced/safety): guardrails for an app that reads untrusted mail and acts on its own.
