Send the notification emails

Deliver the composed emails to <tool>.alerts over SMTP.

Sending is off by default, as in jobs-emailer: an environment has to
enable it explicitly, so that a new deployment cannot mail real people
by accident. Instead, a dry run logs the plain text part of the email.

The SMTP connection has a timeout: an unresponsive mail server should
not block the poll loop.

An email that cannot be sent is retried on the next cycle. The
notification is only recorded once the send succeeded, and the ledger
entry of a resolved alert is only dropped once the resolved email is
sent.

A failure of any kind for one alert does not stop the notifications of
the other alerts.

Assisted-by: Claude Opus 5
Assisted-by: Claude Opus 5.5
Bug: T432865


Related MRs:

Edited by FNegri

Merge request reports

Loading