Email actionedit

The 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.

Connector configurationedit

Email 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, specified in user@host-name format.
Host
Host name of the service provider. If you are using the xpack.actions.whitelistedHosts setting, make sure this hostname is whitelisted.
Port
The port to connect to on the service provider.
Secure
If true the connection will use TLS when connecting to the service provider. See nodemailer TLS documentation for more information.
Username
username for login type authentication.
Password
password for login type authentication.

Preconfigured action typeedit

 my-email:
   name: preconfigured-email-action-type
   actionTypeId: .email
   config:
     from: testsender@test.com
     host: validhostname
     port: 8080
     secure: false
   secrets:
     user: testuser
     password: passwordkeystorevalue

config defines the action type specific to the configuration and contains the following properties:

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.

secrets defines sensitive information for the action type:

user

A string that corresponds to User.

password

A string that corresponds to Password. Should be stored in the Kibana keystore.

Action configurationedit

Email actions have the following configuration properties:

To, CC, BCC
Each is a list of addresses. Addresses can be specified in user@host-name format, or in name <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 accountsedit

The 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:

Sending email from Gmailedit

Use 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.comedit

Use the following email account settings to send email action from the Outlook.com SMTP service:

config:
    host: smtp-mail.outlook.com
    port: 465
    secure: true
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)edit

Use 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>

smtp.host varies depending on the region

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 Exchangeedit

Use the following email account settings to send email action from Microsoft Exchange:

config:
    host: <your exchange server>
    port: 465
    secure: true
    from: <email address of service account> 
secrets:
    user: <email address of service account> 
    password: <password>

Some organizations configure Exchange to validate that the from field is a valid local email account.

Many organizations support use of your email address as your username. Check with your system administrator if you receive authentication-related failures.