Skip to content

Commit

Permalink
[actions] improve email action doc (elastic#90020) (elastic#90562)
Browse files Browse the repository at this point in the history
resolves elastic#88333

Fixed:

- add note that `secure: false` will use TLS, but after an initial connection
  with TCP; we have been getting questions from customers who believed that
  `secure: false` implied TLS was not used at all.

- added a link to the nodemailer "well-known services" module, to allow
  customers to see examples of other email service configurations

- updated the Outlook config example to use the current nodemailer values

- couple of other small tweaks
  • Loading branch information
pmuellr committed Feb 8, 2021
1 parent 8fca529 commit a061fad
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/user/alerting/action-types/email.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Name:: The name of the connector. The name is used to identify a connector
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 <<action-settings, `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. See https://nodemailer.com/smtp/#tls-options[nodemailer TLS documentation] for more information.
Secure:: If true, the connection will use TLS when connecting to the service provider. Refer to the https://nodemailer.com/smtp/#tls-options[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.
Username:: username for 'login' type authentication.
Password:: password for 'login' type authentication.

Expand Down Expand Up @@ -92,6 +92,8 @@ systems, refer to:
* <<exchange>>
* <<amazon-ses>>

For other email servers, you can check the list of well-known services that Nodemailer supports in the JSON file https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json[well-known/services.json]. The properties of the objects in those files &mdash; `host`, `port`, and `secure` &mdash; 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`.

[float]
[[gmail]]
===== Sending email from Gmail
Expand All @@ -109,7 +111,6 @@ https://mail.google.com[Gmail] SMTP service:
user: <username>
password: <password>
--------------------------------------------------
// CONSOLE

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
Expand All @@ -131,9 +132,9 @@ https://www.outlook.com/[Outlook.com] SMTP service:
[source,text]
--------------------------------------------------
config:
host: smtp-mail.outlook.com
port: 465
secure: true
host: smtp.office365.com
port: 587
secure: false
secrets:
user: <email.address>
password: <password>
Expand Down Expand Up @@ -163,7 +164,7 @@ secrets:
user: <username>
password: <password>
--------------------------------------------------
<1> `smtp.host` varies depending on the region
<1> `config.host` varies depending on the region

NOTE: You must use your Amazon SES SMTP credentials to send email through
Amazon SES. For more information, see
Expand Down

0 comments on commit a061fad

Please sign in to comment.