Email action
editEmail action
editThe email action type uses the SMTP protocol to send mail message, using an integration of Nodemailer. Email message text is sent as both plain text and html text.
For emails to have a footer with a link back to Kibana, set the server.publicBaseUrl
configuration setting.
Connector configuration
editEmail connectors have the following configuration properties.
- Name
- The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
- Sender
-
The from address for all emails sent with this connector. This can be specified in
user@host-name
format or as"human name <user@host-name>"
format. See the Nodemailer address documentation for more information. - Host
-
Host name of the service provider. If you are using the
xpack.actions.allowedHosts
setting, make sure this hostname is added to the allowed hosts. - Port
- The port to connect to on the service provider.
- Secure
- If true, the connection will use TLS when connecting to the service provider. Refer to the Nodemailer TLS documentation for more information. If not true, the connection will initially connect over TCP, then attempt to switch to TLS via the SMTP STARTTLS command.
- Require authentication
- If true, a username and password for login type authentication must be provided.
- Username
- Username for login type authentication.
- Password
- Password for login type authentication.
Preconfigured action type
editmy-email: name: preconfigured-email-action-type actionTypeId: .email config: from: [email protected] host: validhostname port: 8080 secure: false secrets: user: testuser password: passwordkeystorevalue
Config defines information for the action type.
-
service
-
The name of a well-known email service provider. If
service
is provided,host
,port
, andsecure
properties are ignored. For more information on thegmail
service value, see the Nodemailer Gmail documentation. -
from
- An email address that corresponds to Sender.
-
host
- A string that corresponds to Host.
-
port
- A number that corresponds to Port.
-
secure
- A boolean that corresponds to Secure.
-
hasAuth
-
A boolean that corresponds to Requires authentication. If
true
, this connector will require values foruser
andpassword
inside the secrets configuration. Defaults totrue
.
Secrets defines sensitive information for the action type.
-
user
-
A string that corresponds to Username. Required if
hasAuth
is set totrue
. -
password
-
A string that corresponds to Password. Should be stored in the Kibana keystore. Required if
hasAuth
is set totrue
.
Action configuration
editEmail actions have the following configuration properties.
- To, CC, BCC
-
Each item is a list of addresses. Addresses can be specified in
user@host-name
format, or inname <user@host-name>
format. One of To, CC, or BCC must contain an entry. - Subject
- The subject line of the email.
- Message
- The message text of the email. Markdown format is supported.
Configuring email accounts for well-known services
editThe email action can send email using many popular SMTP email services.
You configure the email action to send emails using the connector form. For more information about configuring the email connector to work with different email systems, refer to:
For other email servers, you can check the list of well-known services that Nodemailer supports in the JSON file well-known/services.json. The properties of the objects in those files — host
, port
, and secure
— correspond to the same email action configuration properties. A missing secure
property in the "well-known/services.json" file is considered false
. Typically, port: 465
uses secure: true
, and port: 25
and port: 587
use secure: false
.
Sending email from Gmail
editUse the following email account settings to send email from the Gmail SMTP service:
config: host: smtp.gmail.com port: 465 secure: true secrets: user: <username> password: <password>
If you get an authentication error that indicates that you need to continue the sign-in process from a web browser when the action attempts to send email, you need to configure Gmail to allow less secure apps to access your account.
If two-step verification is enabled for your account, you must generate and use a unique App Password to send email from Watcher. See Sign in using App Passwords for more information.
Sending email from Outlook.com
editUse the following email account settings to send email action from the Outlook.com SMTP service:
config: host: smtp.office365.com port: 587 secure: false secrets: user: <email.address> password: <password>
When sending emails, you must provide a from address, either as the default in your account configuration or as part of the email action in the watch.
You must use a unique App Password if two-step verification is enabled. See App passwords and two-step verification for more information.
Sending email from Amazon SES (Simple Email Service)
editUse the following email account settings to send email from the Amazon Simple Email Service (SES) SMTP service:
config: host: email-smtp.us-east-1.amazonaws.com port: 465 secure: true secrets: user: <username> password: <password>
You must use your Amazon SES SMTP credentials to send email through Amazon SES. For more information, see Obtaining Your Amazon SES SMTP Credentials. You might also need to verify your email address or your whole domain at AWS.
Sending email from Microsoft Exchange
editUse the following email account settings to send email action from Microsoft Exchange: