Email

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

Fields

FieldTypeRequiredNotes
typeemailyes
smtpHoststringyesSMTP server hostname
smtpPortintyesusually 25, 465, or 587
smtpUserstringnoSMTP auth user (use env:)
smtpPassstringnoSMTP auth password (use env:)
fromstringyesFrom: address
tostring[]yesone or more recipients
useTLSboolnodial the SMTP server over implicit TLS (typically port 465). Leave false for plaintext or STARTTLS.

Plus the common fields.

Example

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

TLS modes

  • Plain → 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 recipient's From: header is taken verbatim from from. smtpUser defaults to no auth — provide both smtpUser and smtpPass only when the server requires LOGIN/PLAIN auth.