# Mailbox (IMAP)

> A mailbox you already have, read over IMAP. New mail can start your flows, with no DNS change.

Source: https://docs.go-lumen.ai/es/reference/connections/imap-mailbox

## De un vistazo

| Propiedad | Valor |
| --- | --- |
| **Class name** | `imap-mailbox` |
| **Resource** | ConnectorClass (`lumen.ai/v1alpha1`); a workspace creates a Connector with `classRef: {name: imap-mailbox}` |
| **Driver** | `imap-mailbox` |
| **Provides** | `mailbox` |
| **Mode** | pull (Lumen reaches out to the system) |
| **Credential keys** | `password` (kept in a Secret, never in config) |

A workspace adds this connection on the Connections page or with `lumen connect`; credentials are kept in a Secret, never in the flow.

## Ajustes

Se definen bajo `config:` en el Connector.

| Ajuste | Tipo | Valor por defecto | Descripción |
| --- | --- | --- | --- |
| `host` (obligatorio) | string |  | The IMAP server's name, for example mail.example.com or outlook.office365.com. (minLength 1; maxLength 253) |
| `insecureSkipVerify` | boolean | `false` | For development only: anyone on the network could pretend to be your mail server. |
| `port` | integer | `993` | Port (minimum 1; maximum 65535) |
| `security` | string | `"tls"` | TLS is the usual choice (port 993). None is for development only: the password travels unencrypted. (one of tls, starttls, none) |
| `username` (obligatorio) | string |  | Usually the full email address. (minLength 1; maxLength 320) |

El JSON Schema completo de estos ajustes: [imap-mailbox.schema.json](https://docs.go-lumen.ai/schemas/connections/imap-mailbox.schema.json).

## Configuración guiada

`lumen connect` y la aplicación web te guían para añadir esta conexión.

**Preajustes**

-   `gmail` (Gmail)
-   `yahoo` (Yahoo)
-   `icloud` (iCloud)
-   `other` (Other server)

**Credenciales que se piden**

-   `password`: Password

## Uso

```yaml title="connector.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Connector
metadata:
  name: my-imap-mailbox
  namespace: tenant-acme
spec:
  classRef: {name: imap-mailbox}
  config: {}
---
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: mailbox-email-imap-mailbox-example
  namespace: tenant-acme
spec:
  displayName: "Mailbox (IMAP)"
  triggers:
    - id: start
      ref: {name: mailbox-email}
      connectorRef: {name: my-imap-mailbox}
      next: [notify-in-app]
  nodes:
    - id: notify-in-app
      stepRef: {name: notify-in-app}
      config:
        body: 'Total: {total}'
        title: New invoice from {supplier}
        to: admins
```
