SMTP Destination
The SMTP destination sends outbound email through any standard SMTP server, making it a natural fit for critical alerts, lab result notifications, scheduled reports, and other clinical communication that needs to reach a human inbox.
The subject line supports variable interpolation, so each email can include dynamic context from the message being processed.
Configuration
Section titled “Configuration”destination: type: smtp smtp: host: smtp.hospital.org port: 587 from: alerts@hospital.org to: - oncall-lab@hospital.org - pathology-team@hospital.org subject: "CRITICAL: Lab result for ${PATIENT_ID}" cc: - lab-archive@hospital.org content_type: text/html auth: username: ${SMTP_USER} password: ${SMTP_PASSWORD} tls: enabled: trueProperties
Section titled “Properties”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
host | string | Yes | — | SMTP server hostname or IP address. |
port | int | No | 587 | SMTP port. Common values: 25 (relay), 465 (implicit TLS), 587 (STARTTLS). |
from | string | Yes | — | Sender email address. |
to | string[] | Yes | — | One or more recipient email addresses. |
subject | string | Yes | — | Email subject line. Supports ${VAR} interpolation from message metadata. |
cc | string[] | No | — | Carbon-copy recipients. |
bcc | string[] | No | — | Blind carbon-copy recipients. |
content_type | string | No | text/plain | Body MIME type: text/plain or text/html. |
auth | object | No | — | SMTP authentication credentials. |
tls | object | No | — | TLS configuration for the SMTP connection. |
Authentication
Section titled “Authentication”auth: username: ${SMTP_USER} password: ${SMTP_PASSWORD}| Property | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | bool | No | true | Enable STARTTLS or implicit TLS depending on the port. |
insecure_skip_verify | bool | No | false | Skip server certificate validation. Not recommended for production. |
Complete Example
Section titled “Complete Example”Send an HTML email whenever a critical lab result is detected:
id: critical-lab-alertsenabled: truegroup: laboratory
source: type: tcp port: 6661 content_type: hl7v2 mllp: true
transformer: critical-lab-filter.ts
destinations: - type: smtp smtp: host: smtp.hospital.org port: 587 from: lab-alerts@hospital.org to: - oncall-lab@hospital.org - attending-physician@hospital.org subject: "CRITICAL: Abnormal ${TEST_NAME} for MRN ${MRN}" cc: - lab-archive@hospital.org bcc: - compliance@hospital.org content_type: text/html auth: username: ${SMTP_USER} password: ${SMTP_PASSWORD} tls: enabled: true