Skip to content

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.

destination:
type: smtp
smtp:
host: smtp.hospital.org
port: 587
to:
subject: "CRITICAL: Lab result for ${PATIENT_ID}"
cc:
content_type: text/html
auth:
username: ${SMTP_USER}
password: ${SMTP_PASSWORD}
tls:
enabled: true
PropertyTypeRequiredDefaultDescription
hoststringYes—SMTP server hostname or IP address.
portintNo587SMTP port. Common values: 25 (relay), 465 (implicit TLS), 587 (STARTTLS).
fromstringYes—Sender email address.
tostring[]Yes—One or more recipient email addresses.
subjectstringYes—Email subject line. Supports ${VAR} interpolation from message metadata.
ccstring[]No—Carbon-copy recipients.
bccstring[]No—Blind carbon-copy recipients.
content_typestringNotext/plainBody MIME type: text/plain or text/html.
authobjectNo—SMTP authentication credentials.
tlsobjectNo—TLS configuration for the SMTP connection.
auth:
username: ${SMTP_USER}
password: ${SMTP_PASSWORD}
PropertyTypeRequiredDefaultDescription
enabledboolNotrueEnable STARTTLS or implicit TLS depending on the port.
insecure_skip_verifyboolNofalseSkip server certificate validation. Not recommended for production.

Send an HTML email whenever a critical lab result is detected:

channels/critical-lab-alerts/channel.yaml
id: critical-lab-alerts
enabled: true
group: 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
to:
subject: "CRITICAL: Abnormal ${TEST_NAME} for MRN ${MRN}"
cc:
bcc:
content_type: text/html
auth:
username: ${SMTP_USER}
password: ${SMTP_PASSWORD}
tls:
enabled: true