Skip to main content
Kener supports two email delivery backends: a standard SMTP server and the Resend transactional email API. Both are configured via environment variables. You only need one.
Email delivery is shared across all email triggers you create. The SMTP or Resend credentials set via environment variables are used globally — they are not stored per trigger.

Option 1: SMTP

Set the following environment variables. All six are required for SMTP to work.
VariableDescription
SMTP_HOSTHostname of your SMTP server (e.g. smtp.mailgun.org)
SMTP_PORTSMTP port — typically 587 (STARTTLS) or 465 (TLS)
SMTP_USERSMTP login username. Use - to send without authentication.
SMTP_PASSWORDSMTP login password. Use - to send without authentication.
SMTP_SENDERDefault sender address (e.g. alerts@example.com)
SMTP_SECURE1 to use TLS (port 465). 0 for STARTTLS or plain (port 587).
Example in docker-compose.yml:
environment:
  SMTP_HOST: smtp.mailgun.org
  SMTP_PORT: 587
  SMTP_USER: postmaster@mg.example.com
  SMTP_PASSWORD: your-smtp-password
  SMTP_SENDER: alerts@example.com
  SMTP_SECURE: 0
For SMTP servers that don’t require authentication (internal mail relays), set both SMTP_USER and SMTP_PASSWORD to -. Kener omits the auth field from the transport configuration when it detects -.

TLS behaviour

When SMTP_SECURE is 0, Kener sets tls.rejectUnauthorized: false to allow self-signed certificates on internal mail servers. When SMTP_SECURE is 1, certificate verification is enforced.

Option 2: Resend API

Resend is a developer-focused email API. If both SMTP and Resend variables are present, Kener uses Resend.
VariableDescription
RESEND_API_KEYYour Resend API key (starts with re_)
RESEND_SENDER_EMAILVerified sender address in your Resend account
Example in docker-compose.yml:
environment:
  RESEND_API_KEY: re_xxxxxxxxxxxxxxxxxxxx
  RESEND_SENDER_EMAIL: alerts@example.com
The sender address must be verified in your Resend account (or come from a verified domain). Resend will reject sends from unverified addresses.

Create an email trigger

Once email delivery is configured, create a trigger to use it.
1

Go to Triggers

In the admin dashboard, navigate to Triggers and click New Trigger.
2

Select Email as the trigger type

In the Trigger Type dropdown, choose email.If Kener detects that neither SMTP nor Resend is configured, a warning banner appears at the top of the form. Email delivery will fail until the environment variables are set and Kener is restarted.
3

Enter recipients

In the To field, enter one or more recipient email addresses separated by commas:
alice@example.com, bob@example.com
4

Enter the sender

In the From field, use the Name <email@example.com> format:
Kener Alerts <alerts@example.com>
If the sender address here differs from SMTP_SENDER / RESEND_SENDER_EMAIL, the per-trigger sender takes precedence. Ensure the address is authorized by your email provider.
5

Customise the HTML template (optional)

The default email template renders a styled HTML table with all alert details. You can replace it entirely with your own HTML in the Custom HTML Template editor.Available Mustache variables:
VariableDescription
site_nameDisplay name of the Kener site
site_urlPublic URL of the Kener instance
site_logo_urlAbsolute URL to the logo
alert_nameHuman-readable alert label
alert_statusTRIGGERED or RESOLVED
alert_severityWARNING or CRITICAL
alert_forSTATUS, LATENCY, or UPTIME
alert_valueThreshold value
alert_messageAlert description
alert_idUnique alert ID
alert_timestampISO 8601 timestamp
alert_failure_thresholdConfigured failure threshold
alert_success_thresholdConfigured success threshold
alert_cta_urlLink to the monitor page
alert_cta_textCTA button label
alert_incident_urlIncident URL (if incident was created)
is_triggeredtrue when alert fired
is_resolvedtrue when alert cleared
colors_upHex color for UP status
colors_downHex color for DOWN status
colors_degradedHex color for DEGRADED status
colors_maintenanceHex color for MAINTENANCE status
The default subject is {{alert_name}}. You can override this in the Email Subject field.
6

Save and test

Click Create Trigger. After saving, click Test Trigger to send a sample notification to the configured recipients.

Default email template

The built-in HTML template renders the following information in a styled email:
Subject: {{alert_name}}
The body includes:
  • Logo and site link at the top
  • A colored badge showing alert_status (uses colors_down for TRIGGERED, colors_up for RESOLVED)
  • A table with: Alert ID, Status, Timestamp, Severity, Alert Type
  • A metrics box with: Alert Value, Failure Threshold, Success Threshold
  • The alert message text
  • A View Incident button (conditionally rendered when alert_incident_url is set)
  • A CTA button linking to the monitor page (alert_cta_url)

Attach the trigger to an alert config

Email triggers work the same as other triggers. Go to Alerts → Create Alert, configure the condition and thresholds, and select your email trigger from the Notification Triggers list. See alert triggers for the full steps.

Build docs developers (and LLMs) love