Send emails from OpenCTI
Configure the mail server OpenCTI sends emails through from the interface, with basic or OAuth2 authentication, and test it without restarting the platform.
OpenCTI sends notifications, digests, password resets and disseminated files by email. This page shows how to set the mail server from the interface, so a change applies at once, without editing the configuration file or restarting the platform.
In this version, the mail server is set only in the configuration of the platform: see the smtp keys in the SMTP Service section of the configuration reference.
In 7.260811 LTS: Before you start
Set the mail server in the configuration file
The smtp keys of the platform configuration set the mail server at startup, in every version, unless the SMTP configuration screen applies. Change them, then restart the platform.
smtp:enabled (SMTP__ENABLED), true by default, turns email sending on or off. With false, OpenCTI skips the mail server check at startup, logs SMTP disabled by configuration, and sends no email at all, without any error: password resets, notifications and disseminated files never leave the platform. Set it to false on a platform that must not send email, such as a test copy of production. When the SMTP configuration screen applies, its Enable email sending switch decides instead.
Example CERT sends through smtp.example.com, which accepts authenticated clients on port 465 with TLS from the first byte. In the docker compose file, the opencti service gets:
services:
opencti:
environment:
SMTP__HOSTNAME: smtp.example.com
SMTP__PORT: 465
SMTP__USE_SSL: 'true'
SMTP__REJECT_UNAUTHORIZED: 'true'
SMTP__TLS_MIN_VERSION: TLSv1.2
SMTP__USERNAME: cti-platform@example.com
SMTP__PASSWORD: ${SMTP_PASSWORD}
SMTP__USE_SSL opens the connection over TLS, and SMTP__REJECT_UNAUTHORIZED refuses a relay whose certificate does not verify. If the relay uses a private certificate authority, give its root certificate to NODE_EXTRA_CA_CERTS rather than turning the check off. SMTP_PASSWORD comes from the .env file next to the compose file. The From: address is the Sender email address of the platform parameters.
What's next
- Notifiers to send notifications by email.
- Customize the emails OpenCTI sends to shape the emails of the platform.
- The SMTP Service keys of the configuration reference, for timeouts and TLS versions.