# Fastmail

> Read and organize mail, send messages, manage mailboxes and vacation responses.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/fastmail

## Actions

### Create draft email

Create draft email.

**Inputs**

- Identity (`identity_id`, text, required): Identity ID.
- To (`to`, list, required): To.
- Subject (`subject`, text, required): Subject.
- Text (`text`, text, required): Text.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "created": {},
    "newState": "example"
  }
}
```

### Create mailbox

Create mailbox.

**Inputs**

- Name (`name`, text, required): Name.
- Parent (`parent_id`, text): Parent ID.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "created": {},
    "newState": "example"
  }
}
```

### Delete email permanently

Delete email permanently.

**Inputs**

- Email ID (`email_id`, text, required): Email ID.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "destroyed": [],
    "newState": "example"
  }
}
```

### Delete empty mailbox

Delete empty mailbox.

**Inputs**

- Mailbox (`mailbox_id`, text, required): Mailbox ID.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "destroyed": [],
    "newState": "example"
  }
}
```

### Get email

Get email.

**Inputs**

- Email ID (`email_id`, text, required): Email ID.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "list": [],
    "notFound": [],
    "state": "example"
  }
}
```

### Get email changes

Get email changes.

**Inputs**

- Since state (`since_state`, text, required): Since state.
- Max changes (`max_changes`, number): Max changes. From 1 to 1000.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "created": [],
    "destroyed": [],
    "hasMoreChanges": false,
    "newState": "example",
    "oldState": "example",
    "updated": []
  }
}
```

### Get identity

Get identity.

**Inputs**

- Identity (`identity_id`, text, required): Identity ID.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "list": [],
    "notFound": [],
    "state": "example"
  }
}
```

### Get mailbox

Get mailbox.

**Inputs**

- Mailbox (`mailbox_id`, text, required): Mailbox ID.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "list": [],
    "notFound": [],
    "state": "example"
  }
}
```

### Get mailbox changes

Get mailbox changes.

**Inputs**

- Since state (`since_state`, text, required): Since state.
- Max changes (`max_changes`, number): Max changes. From 1 to 1000.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "created": [],
    "destroyed": [],
    "hasMoreChanges": false,
    "newState": "example",
    "oldState": "example",
    "updated": []
  }
}
```

### Get thread

Get thread.

**Inputs**

- Thread ID (`thread_id`, text, required): Thread ID.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "list": [],
    "notFound": [],
    "state": "example"
  }
}
```

### Get vacation response

Get vacation response.

**Inputs**: None.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "list": [],
    "state": "example"
  }
}
```

### List emails

List emails.

**Inputs**

- Position (`position`, number): Position. At least 0.
- Limit (`limit`, number): Limit. From 1 to 100.
- Mailbox (`mailbox_id`, text): Mailbox ID.
- After (`after`, date and time): After.
- Before (`before`, date and time): Before.
- Text (`text`, text): Text.
- Has keyword (`has_keyword`, text): Has keyword. One of: `$seen`, `$flagged`, `$answered`, `$draft`.
- Not keyword (`not_keyword`, text): Not keyword. One of: `$seen`, `$flagged`, `$answered`, `$draft`.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "list": [],
    "position": 1,
    "state": "example",
    "total": 1
  }
}
```

### List identities

List identities.

**Inputs**: None.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "list": [],
    "position": 1,
    "state": "example",
    "total": 1
  }
}
```

### List mailboxes

List mailboxes.

**Inputs**: None.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "list": [],
    "position": 1,
    "state": "example",
    "total": 1
  }
}
```

### List threads

List threads.

**Inputs**

- Position (`position`, number): Position. At least 0.
- Limit (`limit`, number): Limit. From 1 to 100.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "list": [],
    "position": 1,
    "state": "example",
    "total": 1
  }
}
```

### Move email

Move email.

**Inputs**

- Email ID (`email_id`, text, required): Email ID.
- Mailbox (`mailbox_id`, text, required): Mailbox ID.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "newState": "example",
    "updated": {}
  }
}
```

### Rename mailbox

Rename mailbox.

**Inputs**

- Mailbox (`mailbox_id`, text, required): Mailbox ID.
- Name (`name`, text, required): Name.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "newState": "example",
    "updated": {}
  }
}
```

### Send draft email

Send draft email.

**Inputs**

- Email ID (`email_id`, text, required): Email ID.
- Identity (`identity_id`, text, required): Identity ID.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "created": {},
    "newState": "example"
  }
}
```

### Set email flags

Set email flags.

**Inputs**

- Email ID (`email_id`, text, required): Email ID.
- Keywords (`keywords`, list, required): Keywords. One or more of: `$seen`, `$flagged`, `$answered`, `$draft`.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "newState": "example",
    "updated": {}
  }
}
```

### Set vacation response

Set vacation response.

**Inputs**

- Is enabled (`is_enabled`, true/false, required): Is enabled.
- Subject (`subject`, text): Subject.
- Text body (`text_body`, text): Text body.
- From date (`from_date`, date and time): From date.
- To date (`to_date`, date and time): To date.

**Outputs**

- `data` (object): Fastmail response data.

**Example output**

```json
{
  "data": {
    "newState": "example",
    "updated": {}
  }
}
```
