Skip to content

Email (SMTP)

The SMTP notifier sends one email per event through any SMTP server. Each email has an HTML part and a plain-text part, so it reads well in Gmail and in mutt. If the machine already sends mail with a local MTA, the sendmail notifier needs less setup.

runwisp.toml
[notifiers.email-ops]
type = "smtp"
host = "smtp.example.com"
port = 587
from = "RunWisp <[email protected]>"
username = "apikey"
password = "${SMTP_PASSWORD}"
Key Required What it does
host yes The SMTP server, like smtp.gmail.com.
port no Default 25. Usually 587 (STARTTLS) or 465 (TLS from the start).
tls_mode no starttls, implicit, or off. Default implicit on port 465, starttls otherwise. starttls requires TLS.
tls_skip_verify no Don’t check the server’s TLS certificate. Don’t use it in production.
username no SMTP login. Set together with password, or leave both out for a server without login.
password no SMTP password. Keep it out of the file; see Storing the secret.
from yes The From: address: "[email protected]" or "Name <[email protected]>".
reply_to no A Reply-To: address.
to yes List of recipients, at least one.
cc no List of Cc: recipients.
bcc no List of Bcc: recipients.
template_path no A Go template file that replaces the built-in HTML message.

To send one task’s mail to another address through the same server, use "email-ops:[email protected]" in notify. It replaces the to, cc, and bcc lists for that task. See One channel, several destinations.

Gmail needs an app password; it rejects your normal password over SMTP.

runwisp.toml
[notifiers.email-ops]
type = "smtp"
host = "smtp.gmail.com"
port = 587
from = "Your Name <[email protected]>"
username = "[email protected]"
password = "${GMAIL_APP_PASSWORD}"

If the bell shows a notify.delivery_failed warning, it includes the SMTP error. Common causes:

  • The port doesn’t match tls_mode: port 587 needs starttls, port 465 needs implicit.
  • An expired or wrong app password.
  • The server rejects a recipient (550 No such user).

If nothing failed, check the spam folder. The first mail from a new sender often lands there.

❌ backup-postgres failed

Exited with code 1 after 0.3s. Scheduled run · 14 May, 17:11.

Error: connection refused
dial tcp 127.0.0.1:5432: connect:
connection refused

[View full run]

from runwisp · bright-falcon

  • The output block appears for failures and timeouts, up to three lines or 300 bytes.
  • The View full run link appears only when the Web UI address is known.
  • The footer names the daemon that sent it.
  • The plain-text part is made from the HTML, so text-only mail readers see the same content.

Point template_path at your own Go template. Start from the built-in smtp.tmpl.html. It gets the whole event and the same helpers as the Slack template. Escape values with htmlEsc.

  • A missing host, from, or to.
  • username without password, or password without username.
  • tls_mode = "off" with a username and password: RunWisp won’t send a password without encryption.
  • A from, reply_to, to, cc, or bcc value that isn’t a valid email address.