Skip to content

Commit d808aee

Browse files
committed
[Alerting] for email action, set tls.rejectUnauthorized: false when secure: false (#62380)
resolves #62372 See the referenced issue for background. Eventually we will probably have to have a separate setting for `tls.rejectUnauthorized`, not base it on the value of the `secure` config property. But this will likely be useful for a number of smtp servers used by customers.
1 parent 3dc4515 commit d808aee

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • x-pack/plugins/actions/server/builtin_action_types/lib

x-pack/plugins/actions/server/builtin_action_types/lib/send_email.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ export async function sendEmail(logger: Logger, options: SendEmailOptions): Prom
6565
transportConfig.host = host;
6666
transportConfig.port = port;
6767
transportConfig.secure = !!secure;
68+
if (!transportConfig.secure) {
69+
transportConfig.tls = {
70+
rejectUnauthorized: false,
71+
};
72+
}
6873
}
6974

7075
const nodemailerTransport = nodemailer.createTransport(transportConfig);

0 commit comments

Comments
 (0)