---
title: "Temporary mail"
description: "Disposable inboxes for a sign-up or a test."
url: "https://openemail.uk/docs/mcp/tools/temp-mail"
area: "MCP server"
category: "Tools"
---

# Temporary mail

Disposable inboxes for a sign-up or a test.

## Temporary mail tools

| Tool | What it does |
| --- | --- |
| listTempMailDomains | The domains a temporary inbox can be made on. |
| createTempInbox | A new disposable address and the inbox token that opens it. Keep the token: every other temporary mail tool needs it. |
| getTempInbox | The address of an inbox, when it expires, how many extensions are left and how many messages it holds. |
| listTempMessages | The messages an inbox received, newest first, with sender, subject, arrival time and a snippet. |
| readTempMessage | One message with its text, and its sign-in code when it is a verification email and OpenEmail is sure of the code. |
| extendTempInbox | Keep an inbox open longer. It returns a new token to use from then on. |
| deleteTempMessage | Delete one message of an inbox for good. |
| deleteTempInbox | Close an inbox now and delete everything it received. |

> These are the free disposable inboxes of the OpenEmail website. An inbox belongs to no workspace and opens with its own token, so the tools need no permission and the token is the only key. Anyone holding it can read the inbox.

> Mail to the address is kept for a day at most. A chosen name can be guessed and is taken by somebody else once the inbox expires, so leave `localPart` out for a random one.

## Reference

### `listTempMailDomains`

List the domains a temporary inbox can be made on, the free disposable addresses of the OpenEmail website. A temporary inbox belongs to no workspace and opens with its own token.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

Takes no input.

Also available in: API [`GET /temp-mail/domains`](https://openemail.uk/docs/api/reference/temp-mail#get-temp-mail-domains); TypeScript [`tempMail.listDomains()`](https://openemail.uk/docs/sdk/reference/temp-mail#listDomains); Python [`temp_mail.list_domains()`](https://openemail.uk/docs/python/reference/temp-mail#listDomains); Ruby [`temp_mail.list_domains`](https://openemail.uk/docs/ruby/reference/temp-mail#listDomains); PHP [`tempMail->listDomains`](https://openemail.uk/docs/php/reference/temp-mail#listDomains).

### `createTempInbox`

Make a temporary inbox: a disposable address that receives mail for a while, for a sign-up or a test, without touching the workspace. Returns the address and an inbox token that every other temporary mail tool needs, so keep it. Read what arrives with listTempMessages and readTempMessage, which also gives the sign-in code of a verification email. The inbox lasts an hour by default and at most 1440 minutes in all.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, up to 253 characters): One of the domains listTempMailDomains names. Defaults to the first.
- `localPart` (`string`, up to 64 characters): The part before the @. Leave it out for a random one: a chosen name can be guessed and is taken by somebody else once the inbox expires.
- `ttlMinutes` (`integer`, at least 1, at most 1440): How long the inbox lasts, in minutes.

Also available in: API [`POST /temp-mail/inboxes`](https://openemail.uk/docs/api/reference/temp-mail#post-temp-mail-inboxes); TypeScript [`tempMail.create()`](https://openemail.uk/docs/sdk/reference/temp-mail#create); Python [`temp_mail.create()`](https://openemail.uk/docs/python/reference/temp-mail#create); Ruby [`temp_mail.create`](https://openemail.uk/docs/ruby/reference/temp-mail#create); PHP [`tempMail->create`](https://openemail.uk/docs/php/reference/temp-mail#create).

### `getTempInbox`

Read a temporary inbox: its address, when it expires, how many extensions are left and how many messages it holds.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `token` (`string`, required, 1 to 4096 characters): The inbox token createTempInbox returned, starting with oe_inbox_. It is the only key to the inbox.

Also available in: API [`GET /temp-mail/inboxes/{id}`](https://openemail.uk/docs/api/reference/temp-mail#get-temp-mail-inboxes-id), [`GET /temp-mail/inboxes/{id}/messages`](https://openemail.uk/docs/api/reference/temp-mail#get-temp-mail-inboxes-id-messages); TypeScript [`tempMail.get()`](https://openemail.uk/docs/sdk/reference/temp-mail#get), [`tempMail.listMessages()`](https://openemail.uk/docs/sdk/reference/temp-mail#listMessages), [`tempMail.listAllMessages()`](https://openemail.uk/docs/sdk/reference/temp-mail#listAllMessages), [`tempMail.iterateMessages()`](https://openemail.uk/docs/sdk/reference/temp-mail#iterateMessages); Python [`temp_mail.get()`](https://openemail.uk/docs/python/reference/temp-mail#get), [`temp_mail.list_messages()`](https://openemail.uk/docs/python/reference/temp-mail#listMessages), [`temp_mail.list_all_messages()`](https://openemail.uk/docs/python/reference/temp-mail#listAllMessages), [`temp_mail.iterate_messages()`](https://openemail.uk/docs/python/reference/temp-mail#iterateMessages); Ruby [`temp_mail.get`](https://openemail.uk/docs/ruby/reference/temp-mail#get), [`temp_mail.list_messages`](https://openemail.uk/docs/ruby/reference/temp-mail#listMessages), [`temp_mail.list_all_messages`](https://openemail.uk/docs/ruby/reference/temp-mail#listAllMessages), [`temp_mail.iterate_messages`](https://openemail.uk/docs/ruby/reference/temp-mail#iterateMessages); PHP [`tempMail->get`](https://openemail.uk/docs/php/reference/temp-mail#get), [`tempMail->listMessages`](https://openemail.uk/docs/php/reference/temp-mail#listMessages), [`tempMail->listAllMessages`](https://openemail.uk/docs/php/reference/temp-mail#listAllMessages), [`tempMail->iterateMessages`](https://openemail.uk/docs/php/reference/temp-mail#iterateMessages).

### `listTempMessages`

List the messages a temporary inbox has received, newest first: id, sender, subject, when it arrived and a snippet.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `token` (`string`, required, 1 to 4096 characters): The inbox token createTempInbox returned, starting with oe_inbox_. It is the only key to the inbox.
- `limit` (`integer`, at least 1, at most 50): How many messages to return.
- `cursor` (`string`, 1 to 512 characters): The next cursor of the previous page.

Also available in: API [`GET /temp-mail/inboxes/{id}`](https://openemail.uk/docs/api/reference/temp-mail#get-temp-mail-inboxes-id), [`GET /temp-mail/inboxes/{id}/messages`](https://openemail.uk/docs/api/reference/temp-mail#get-temp-mail-inboxes-id-messages); TypeScript [`tempMail.get()`](https://openemail.uk/docs/sdk/reference/temp-mail#get), [`tempMail.listMessages()`](https://openemail.uk/docs/sdk/reference/temp-mail#listMessages), [`tempMail.listAllMessages()`](https://openemail.uk/docs/sdk/reference/temp-mail#listAllMessages), [`tempMail.iterateMessages()`](https://openemail.uk/docs/sdk/reference/temp-mail#iterateMessages); Python [`temp_mail.get()`](https://openemail.uk/docs/python/reference/temp-mail#get), [`temp_mail.list_messages()`](https://openemail.uk/docs/python/reference/temp-mail#listMessages), [`temp_mail.list_all_messages()`](https://openemail.uk/docs/python/reference/temp-mail#listAllMessages), [`temp_mail.iterate_messages()`](https://openemail.uk/docs/python/reference/temp-mail#iterateMessages); Ruby [`temp_mail.get`](https://openemail.uk/docs/ruby/reference/temp-mail#get), [`temp_mail.list_messages`](https://openemail.uk/docs/ruby/reference/temp-mail#listMessages), [`temp_mail.list_all_messages`](https://openemail.uk/docs/ruby/reference/temp-mail#listAllMessages), [`temp_mail.iterate_messages`](https://openemail.uk/docs/ruby/reference/temp-mail#iterateMessages); PHP [`tempMail->get`](https://openemail.uk/docs/php/reference/temp-mail#get), [`tempMail->listMessages`](https://openemail.uk/docs/php/reference/temp-mail#listMessages), [`tempMail->listAllMessages`](https://openemail.uk/docs/php/reference/temp-mail#listAllMessages), [`tempMail->iterateMessages`](https://openemail.uk/docs/php/reference/temp-mail#iterateMessages).

### `readTempMessage`

Read one message of a temporary inbox: sender, subject, when it arrived, the sign-in code when it is a verification email and OpenEmail is sure of it, and the text.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `token` (`string`, required, 1 to 4096 characters): The inbox token createTempInbox returned, starting with oe_inbox_. It is the only key to the inbox.
- `messageId` (`string`, required, 1 to 512 characters): The message id listTempMessages returned.

Also available in: API [`GET /temp-mail/inboxes/{id}/messages/{messageId}`](https://openemail.uk/docs/api/reference/temp-mail#get-temp-mail-inboxes-id-messages-messageid); TypeScript [`tempMail.getMessage()`](https://openemail.uk/docs/sdk/reference/temp-mail#getMessage); Python [`temp_mail.get_message()`](https://openemail.uk/docs/python/reference/temp-mail#getMessage); Ruby [`temp_mail.get_message`](https://openemail.uk/docs/ruby/reference/temp-mail#getMessage); PHP [`tempMail->getMessage`](https://openemail.uk/docs/php/reference/temp-mail#getMessage).

### `extendTempInbox`

Keep a temporary inbox open longer. Each extension adds time up to 1440 minutes in all, at most 23 times. It returns a new inbox token: use it from then on.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `token` (`string`, required, 1 to 4096 characters): The inbox token createTempInbox returned, starting with oe_inbox_. It is the only key to the inbox.

Also available in: API [`POST /temp-mail/inboxes/{id}/extend`](https://openemail.uk/docs/api/reference/temp-mail#post-temp-mail-inboxes-id-extend); TypeScript [`tempMail.extend()`](https://openemail.uk/docs/sdk/reference/temp-mail#extend); Python [`temp_mail.extend()`](https://openemail.uk/docs/python/reference/temp-mail#extend); Ruby [`temp_mail.extend`](https://openemail.uk/docs/ruby/reference/temp-mail#extend); PHP [`tempMail->extend`](https://openemail.uk/docs/php/reference/temp-mail#extend).

### `deleteTempMessage`

Delete one message of a temporary inbox for good.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `token` (`string`, required, 1 to 4096 characters): The inbox token createTempInbox returned, starting with oe_inbox_. It is the only key to the inbox.
- `messageId` (`string`, required, 1 to 512 characters): The message id listTempMessages returned.

Also available in: API [`DELETE /temp-mail/inboxes/{id}/messages/{messageId}`](https://openemail.uk/docs/api/reference/temp-mail#delete-temp-mail-inboxes-id-messages-messageid); TypeScript [`tempMail.deleteMessage()`](https://openemail.uk/docs/sdk/reference/temp-mail#deleteMessage); Python [`temp_mail.delete_message()`](https://openemail.uk/docs/python/reference/temp-mail#deleteMessage); Ruby [`temp_mail.delete_message`](https://openemail.uk/docs/ruby/reference/temp-mail#deleteMessage); PHP [`tempMail->deleteMessage`](https://openemail.uk/docs/php/reference/temp-mail#deleteMessage).

### `deleteTempInbox`

Close a temporary inbox now and delete everything it received. Its token stops working.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `token` (`string`, required, 1 to 4096 characters): The inbox token createTempInbox returned, starting with oe_inbox_. It is the only key to the inbox.

Also available in: API [`DELETE /temp-mail/inboxes/{id}`](https://openemail.uk/docs/api/reference/temp-mail#delete-temp-mail-inboxes-id); TypeScript [`tempMail.delete()`](https://openemail.uk/docs/sdk/reference/temp-mail#delete); Python [`temp_mail.delete()`](https://openemail.uk/docs/python/reference/temp-mail#delete); Ruby [`temp_mail.delete`](https://openemail.uk/docs/ruby/reference/temp-mail#delete); PHP [`tempMail->delete`](https://openemail.uk/docs/php/reference/temp-mail#delete).
