Grafana SMTP settings for alert email

Grafana sends alert notifications, user invites and password resets with the `[smtp]` section of `grafana.ini` (`/etc/grafana/grafana.ini` on deb and RPM installs). `host` takes host and port in one value, and Grafana switches to implicit TLS only when that port is exactly 465. Unitpost's 2465 fallback therefore won't work here; if 587 is blocked, use 2587.

Need an API key?

SMTP password is a Unitpost API key with emails:send. Username is always unitpost.

  • 5,000 emails/month
  • 3 API keys
  • 5 sending domains
Get free SMTP key
  1. Create a send-only key

    In Unitpost, open Settings → SMTP and create a send-only key. from_address defaults to admin@grafana.localhost, so change it to an address on a verified domain.

  2. Edit grafana.ini

    Left empty, startTLS_policy upgrades only if the server offers it; MandatoryStartTLS refuses to send without TLS. For implicit TLS, use host = smtp.unitpost.com:465 and leave the policy empty.

    ini
    [smtp]
    enabled = true
    host = smtp.unitpost.com:587
    user = unitpost
    password = pk_live_...
    from_address = grafana@yourdomain.com
    from_name = Grafana
    startTLS_policy = MandatoryStartTLS

    In Docker, each key maps to GF_SMTP_<KEY>: GF_SMTP_ENABLED=true, GF_SMTP_HOST=smtp.unitpost.com:587, GF_SMTP_USER=unitpost, GF_SMTP_PASSWORD, GF_SMTP_FROM_ADDRESS and GF_SMTP_STARTTLS_POLICY.

  3. Restart Grafana

    Grafana reads grafana.ini at startup.

    Shell
    sudo systemctl restart grafana-server
  4. Test an email contact point

    Go to Alerts & IRM → Alerting → Notification configuration and open the Contact points tab. Edit or create a contact point with the Email integration, click Test, then Send test notification.

  5. If the test fails

    SMTP not configured, check your grafana.ini config file's [smtp] section means enabled is still false or Grafana hasn't restarted. A timeout on 2465 is the port 465 rule above. 550 5.7.1 means from_address isn't on a verified domain.

Search docs and guides

Search the docs and product guides.