---
title: "SMTP settings"
summary: "Settings for outbound email, which local sign-in uses to deliver codes."
description: "The mail server used to deliver sign-in codes."
status: preview
generated: true
read_when:
  - "Sign-in codes are not arriving."
---

Every setting below is read once at startup and requires a restart to change.
Built-in defaults are overridden by nonempty environment values.
Unknown `FANOUT_` names fail startup; platform-injected service names are tolerated.
Vendor credentials and endpoints keep the vendor's documented names.

| Environment variable | Type | Default |
|---|---|---|
| `FANOUT_SMTP_FROM` | string | — |
| `FANOUT_SMTP_HOST` | string | — |
| `FANOUT_SMTP_PASSWORD` or `FANOUT_SMTP_PASSWORD_FILE` | string · secret | — |
| `FANOUT_SMTP_PORT` | integer | `587` |
| `FANOUT_SMTP_USERNAME` | string | — |

## Notes

### `FANOUT_SMTP_FROM`

Sets the email sender address; required with SMTP.

### `FANOUT_SMTP_HOST`

Selects the mail server. Host, username, password, and from must all be set to enable SMTP.

### `FANOUT_SMTP_PASSWORD`

Authenticates to the mail server; required with SMTP.

### `FANOUT_SMTP_PORT`

Sets the mail server's positive TCP port.

### `FANOUT_SMTP_USERNAME`

Authenticates to the mail server; required with SMTP.

> **Secrets**
>
> Settings marked `secret` are redacted from Fanout's startup configuration
> log. Supply either the value or its `_FILE` path, never both. File contents
> lose exactly one trailing newline (LF or CRLF); empty secrets fail startup.
