This page was generated from the source of RoboHub. Edit the source, not this page.
robohub-provider-email
An alert channel that sends each alert as an e-mail: through an SMTP server, or
into a local outbox file so a machine with no mail server still shows what would
have gone out. It implements the robohub.alert interface (its send), and the
application calls alert.raise(...), never the provider (see
robohub-alert/index).
Binding it
deps:
robohub:
robohub-alert: ">=1.1.0"
robohub-provider-email: ">=0.2.0"
bind:
robohub.alert:
providers: [robohub-provider-email]
config:
robohub-provider-email:
mode: smtp
to_address: "ops@example.com"
from_address: "robohub@example.com"
smtp_host: "smtp.example.com"
smtp_security: starttls
severity_threshold: WARNING
Secrets such as smtp_pass belong in the application's bind.conf (written by
the settings page), not in the manifest.
Settings
| Setting | Default | What it is |
|---|---|---|
mode | local | local appends the message to <workspace>/alerts/email-outbox.eml; smtp sends it |
to_address | — | The recipient; required — without it nothing is sent |
from_address | alerts@robohub.internal | The sender |
app | RoboHub | The name {app} stands for |
subject_template | [RoboHub {app}] {level}: {rule} | The subject |
body_template | {message} ({app}) | The body |
smtp_host | — | The SMTP server; required in smtp mode |
smtp_port | 587 | Its port |
smtp_security | none | starttls (or tls) requires STARTTLS; ssl (or smtps) connects over TLS |
smtp_user, smtp_pass | — | The login, when the server needs one |
severity_threshold | everything | The lowest level sent: INFO, WARNING, ERROR, CRITICAL |
enabled | on | "false" stops the channel |
The templates fill {level}, {message}, {metadata}, {app} and {rule}
(the rule the alert's metadata names, {"rule":"too-warm"}, or the metadata
itself). Line breaks are taken out of every header value, so a message cannot
add a header of its own.
send answers 1 when the message was written or accepted by the server, 0
when a required setting is missing or the transfer failed. The mail is uploaded
with curl; the login is passed through an owner-only file, never on a command
line.
Release history
[0.1.0] - 2026-11-02
The local-outbox and SMTP provider for the alert contract.
[0.2.0] - 2026-11-12
A provider of the alert interface: the module lists robohub.alert under implements and exports send(level, message, metadata), which sends the alert by SMTP or to the local outbox. Its settings are declared under provides.settings and read with rho_bind_config, from the binding of the application that uses it; the provider: block and the key=value; configuration string are gone, and the alert plugin that wrapped it was removed.
[0.2.1] - 2026-11-13
A header's value has its line breaks taken out, so a message or a rule name cannot add a header of its own; the SMTP password is read by curl from a file only this user can read, not from its command line; {rule} is the rule's name rather than the whole metadata; an SMTP error is a failure.
[0.2.2] - 2026-11-14
Its data is kept where app_workspace() says (rho 0.8.0) — the application's workspace, else ~/.rho/apps/<app> — so two applications started by hand no longer share this module's records. Needs rho 0.8.0.
[0.2.3] - 2026-11-14
Its own replace helper is gone for the toolchain's str_replace (rho 0.8.3), which it needs.