Skip to main content

Email

Read attachments from a mailbox (IMAP), or send results as email (SMTP).

Messaging↓ Inbound↑ Outbound
Type codeEMAIL
Camel componentcamel-mail
Formats carried
HL7 v2FHIR R4JSONXMLCSVExcel (XLSX)Fixed-width textPDF
Terms used on this page

TLS - Transport Layer Security - the encryption behind https:// and secure sockets · IMAP - Internet Message Access Protocol - reads mail from a mailbox · SMTP - Simple Mail Transfer Protocol - sends mail · STARTTLS - a way to switch a mail connection to TLS after it has started

See the Glossary for every term.

Pick the port to match the direction

IMAP (reading) uses 993 with TLS. SMTP (sending) uses 465 with TLS or 587 with STARTTLS.

Test connection signs in but never touches mail

It performs an IMAP LOGIN or SMTP AUTH only. No mail is read or sent. Use the mailbox's password, or an app password where the provider requires one.

Worked example​

Results by email (SMTP) · Outbound · PDF · Test passes on any engine: No - placeholder values

Placeholder mail server - replace with your SMTP server, mailbox and password.

Values entered by Fill example
{
"direction": "Outbound",
"format": "PDF",
"settings": {
"host": "smtp.example.com",
"port": "587",
"username": "results@example.com",
"to": "clinic@example.com"
}
}
Placeholder values

The addresses above are placeholders on example.com. Replace them with your partner's real details before running Test connection.

This is what the console's Fill example button enters. Secrets are never part of an example. Every setting is explained below.

Settings​

Required fields are marked Yes. Fields marked 🔒 (password) are stored encrypted and never sent back to the browser - the console only shows Set / Not set. A field marked inbound only or outbound only appears just for that direction.

SettingTypeRequiredDefaultWhat to enter
host
Mail server
textYes—e.g. imap.example.com or smtp.example.com
port
Port
numberYes993IMAP 993 (TLS). SMTP 465 (TLS) or 587 (STARTTLS).
username
Username
textYes—Required: the mailbox account, e.g. results@lab.example.org.
password
Password
passwordNo—🔒 secret. Required: its password or app password. Stored encrypted.
folder
Mailbox folder
textNoINBOXinbound only. Which mailbox folder to read, e.g. INBOX.
to
Send to
textNo—outbound only. Who receives messages, e.g. lab-results@hospital.example.org.

What "Test connection" checks​

Signs in to the mail server (IMAP LOGIN, or SMTP AUTH). No mail is read or sent.

Test connection is read-only and says how far it got: verified, reached, checked or failed. See Testing a connection, and Troubleshooting if it fails.