> ## Documentation Index
> Fetch the complete documentation index at: https://snapr.seshuk.im/llms.txt
> Use this file to discover all available pages before exploring further.

# Email

> Send job run results by SMTP email to one or more recipients after each snapr job run.

`type: email` sends an SMTP message to one or more recipients.

## Options

| Option     | Type      | Required | Default | Description                                                                                        |
| ---------- | --------- | -------- | ------- | -------------------------------------------------------------------------------------------------- |
| `type`     | `email`   | Yes      | —       |                                                                                                    |
| `smtpHost` | string    | Yes      | —       | SMTP server hostname.                                                                              |
| `smtpPort` | int       | Yes      | —       | Usually `25`, `465`, or `587`.                                                                     |
| `smtpUser` | string    | No       | —       | SMTP auth user. Use `env:`.                                                                        |
| `smtpPass` | string    | No       | —       | SMTP auth password. Use `env:`.                                                                    |
| `from`     | string    | Yes      | —       | `From:` address.                                                                                   |
| `to`       | string\[] | Yes      | —       | One or more recipients.                                                                            |
| `useTLS`   | bool      | No       | `false` | Dial the server over implicit TLS (typically port `465`). Leave `false` for plaintext or STARTTLS. |

Plus the [common fields](/configuration/notifiers/overview) (`name`, `onSuccess`, `onFailure`).

## TLS modes

* **STARTTLS upgrade (port `587`)**: leave `useTLS: false`. snapr negotiates STARTTLS automatically when the server advertises it.
* **Implicit TLS (port `465`)**: set `useTLS: true`. snapr opens a TLS connection from the start.
* **Plaintext**: leave `useTLS: false` and connect to a server that does not advertise STARTTLS. Not recommended.

The `From:` header is taken verbatim from `from`. Authentication is skipped by default — provide both `smtpUser` and `smtpPass` only when the server requires `LOGIN`/`PLAIN` auth.

## Example

```yaml snapr.yaml theme={null}
notifiers:
  - type: email
    name: ops-mail
    smtpHost: smtp.example.com
    smtpPort: 587
    smtpUser: alerts@example.com
    smtpPass: env:SMTP_PASSWORD
    from: alerts@example.com
    to:
      - oncall@example.com
      - sre@example.com
    onFailure: true
```
