# `MailglassInbound.Mailbox`
[🔗](https://github.com/szTheory/mailglass/blob/v0.1.0/lib/mailglass_inbound/mailbox.ex#L1)

Behaviour for adopter-defined inbound mailboxes.

Phase 39 locks the public mailbox contract to one callback:
`process/1`. The callback receives the stable
`%MailglassInbound.InboundMessage{}` value object and must return one of the
approved outcomes:

- `:accept`
- `:ignore`
- `{:reject, reason}`
- `{:bounce, reason}`

Raises, throws, and exits are execution failures handled by internal runners.
They are not semantic mailbox outcomes.

# `outcome`

```elixir
@type outcome() ::
  :accept | :ignore | {:reject, outcome_reason()} | {:bounce, outcome_reason()}
```

# `outcome_reason`

```elixir
@type outcome_reason() :: term()
```

# `process`

```elixir
@callback process(MailglassInbound.InboundMessage.t()) :: outcome()
```

# `valid_outcome?`

```elixir
@spec valid_outcome?(term()) :: boolean()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
