---
title: "openemail out-of-office"
description: "Every command in this namespace, with its arguments, flags and examples."
url: "https://openemail.uk/docs/cli/reference/out-of-office"
area: "CLI"
category: "Reference"
---

# openemail out-of-office

Every command in this namespace, with its arguments, flags and examples.

## Commands

### `openemail out-of-office list`

Read out of office replies

```bash
openemail out-of-office list [flags]
```

Resolves every out of office reply saved in the workspace, by address. With `--address` the array holds exactly one row, the reply of that address, which reads `enabled: false` with empty text when none was ever saved.

`active` says whether the reply is going out right now: it is on, the start has passed and the end has not. An address is one address, such as `hello@example.com`, or `*@example.com` for the catch-all of a domain.

- Scopes: `settings:read`.
- Needs a sign-in.
- Aliases: `ls`.

**Flags**

- `--address <value>`: One address, such as `hello@example.com`, or `*@example.com` for the catch-all of a domain. Left out, every reply saved in the workspace.

**Examples**

```bash
openemail out-of-office list
```

With optional flags

```bash
openemail out-of-office list --address ada@example.com
```

Also available in: API [`GET /out-of-office`](https://openemail.uk/docs/api/reference/settings#get-out-of-office); TypeScript [`outOfOffice.list()`](https://openemail.uk/docs/sdk/reference/out-of-office#list); Python [`out_of_office.list()`](https://openemail.uk/docs/python/reference/out-of-office#list); Ruby [`out_of_office.list`](https://openemail.uk/docs/ruby/reference/out-of-office#list); PHP [`outOfOffice->list`](https://openemail.uk/docs/php/reference/out-of-office#list); Go [`OutOfOffice.List`](https://openemail.uk/docs/go/reference/out-of-office#list); Java [`outOfOffice().list`](https://openemail.uk/docs/java/reference/out-of-office#list); C# [`OutOfOffice.ListAsync`](https://openemail.uk/docs/csharp/reference/out-of-office#list).

### `openemail out-of-office set`

Set an out of office reply

```bash
openemail out-of-office set <address> --message <value> [flags]
openemail out-of-office set <address> --data <json|@file|-> [flags]
```

Saves the out of office reply of one address, or of a catch-all with `*@example.com`, replacing whatever was saved. While it is active, each person who writes to the address gets the message once for the whole away period, as a reply in the same thread. Mail that would not alert anyone gets no reply: spam, mail a rule filed away, newsletters and other bulk mail, automatic mail, bounces, blocked senders and the workspace's own addresses. With `--contacts-only`, only people in the contacts, or people the workspace has written to, are answered.

Leave `--starts-at` out to start now, or to keep the start of a reply that is already on, and `--ends-at` out or null to keep it on until it is switched off. Both take a `Date` or an ISO 8601 string with an offset, and the SDK converts a `Date` with `toISOString()`. An address with a reply of its own is never answered by the catch-all. Replies count toward the monthly sends, carry no tracking, and still go out on muted threads.

- Scopes: `settings:write`.
- Needs a sign-in.

**Arguments**

- `<address>` (required): One address, such as `hello@example.com`, or `*@example.com` for the catch-all of a domain. A key or an app limited to particular addresses or domains reaches only the addresses it holds, and a catch-all only when it holds the domain whole.

**Flags**

- `--message <value>`: The reply, as plain text, 1 to 10,000 characters once trimmed. Line breaks are kept. Required, here or in `--data`.
- `--subject <value>` (default `""`): The subject of the reply, at most 255 characters. Left out or empty, the reply answers with `Re:` and the subject received.
- `--enabled` (default `true`): Whether the reply is switched on. Left out, true. `false` keeps the text and pauses the reply.
- `--starts-at <when>`: When the reply starts. Left out or null, now, or the start it already has while the reply is on.
- `--ends-at <when>`: When it stops, later than `--starts-at`. Left out or null, it stays on until it is switched off.
- `--contacts-only` (default `false`): Answer only contacts and people the workspace has written to. Left out, false.
- `--data <json|@file|->`: The whole `body` as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

**Examples**

The required values only

```bash
openemail out-of-office set ada@example.com --message 'I am away until 4 January and will answer when I am back.'
```

With optional flags

```bash
openemail out-of-office set ada@example.com --message 'I am away until 4 January and will answer when I am back.' --subject 'Away until 4 January' --contacts-only
```

Read the whole body from a JSON file

```bash
openemail out-of-office set ada@example.com --data @out-of-office.json
```

Also available in: API [`PUT /out-of-office`](https://openemail.uk/docs/api/reference/settings#put-out-of-office); TypeScript [`outOfOffice.set()`](https://openemail.uk/docs/sdk/reference/out-of-office#set); Python [`out_of_office.set()`](https://openemail.uk/docs/python/reference/out-of-office#set); Ruby [`out_of_office.set`](https://openemail.uk/docs/ruby/reference/out-of-office#set); PHP [`outOfOffice->set`](https://openemail.uk/docs/php/reference/out-of-office#set); Go [`OutOfOffice.Set`](https://openemail.uk/docs/go/reference/out-of-office#set); Java [`outOfOffice().set`](https://openemail.uk/docs/java/reference/out-of-office#set); C# [`OutOfOffice.SetAsync`](https://openemail.uk/docs/csharp/reference/out-of-office#set).

### `openemail out-of-office clear`

Remove an out of office reply

```bash
openemail out-of-office clear <address> [flags]
```

Removes the saved reply of one address or catch-all, so nothing is answered from it any more. Removing a reply that was never saved changes nothing, which is why the SDK retries this call.

To pause a reply and keep its text, save it with `enabled: false` through `set` instead.

- Scopes: `settings:write`.
- Needs a sign-in.
- Asks you to confirm.

**Arguments**

- `<address>` (required): One address, such as `hello@example.com`, or `*@example.com` for the catch-all of a domain. A key or an app limited to particular addresses or domains reaches only the addresses it holds, and a catch-all only when it holds the domain whole.

**Examples**

```bash
openemail out-of-office clear ada@example.com
```

Skip the confirmation, for scripts

```bash
openemail out-of-office clear ada@example.com --yes
```

Also available in: API [`DELETE /out-of-office`](https://openemail.uk/docs/api/reference/settings#delete-out-of-office); TypeScript [`outOfOffice.clear()`](https://openemail.uk/docs/sdk/reference/out-of-office#clear); Python [`out_of_office.clear()`](https://openemail.uk/docs/python/reference/out-of-office#clear); Ruby [`out_of_office.clear`](https://openemail.uk/docs/ruby/reference/out-of-office#clear); PHP [`outOfOffice->clear`](https://openemail.uk/docs/php/reference/out-of-office#clear); Go [`OutOfOffice.Clear`](https://openemail.uk/docs/go/reference/out-of-office#clear); Java [`outOfOffice().clear`](https://openemail.uk/docs/java/reference/out-of-office#clear); C# [`OutOfOffice.ClearAsync`](https://openemail.uk/docs/csharp/reference/out-of-office#clear).
