From 940d6402ae665dfbd55bba4170c7b7c5e5be8c91 Mon Sep 17 00:00:00 2001 From: Brian Murphy Date: Tue, 12 Aug 2014 19:54:13 +0100 Subject: [PATCH] Alerting : connect email The last commit ommited a line that actually sends the email on alert trigger. Original commit: elastic/x-pack-elasticsearch@24b5c01db884f5481ad550c49838f0dfab650a38 --- src/main/java/org/elasticsearch/alerting/EmailAlertAction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/alerting/EmailAlertAction.java b/src/main/java/org/elasticsearch/alerting/EmailAlertAction.java index 378b5cfadd8..564cabab129 100644 --- a/src/main/java/org/elasticsearch/alerting/EmailAlertAction.java +++ b/src/main/java/org/elasticsearch/alerting/EmailAlertAction.java @@ -56,10 +56,11 @@ public class EmailAlertAction implements AlertAction { InternetAddress.parse(emailAddresses.get(0))); message.setSubject("Elasticsearch Alert!"); message.setText(result.searchResponse.toString()); + Transport.send(message); } catch (Exception e){ throw new ElasticsearchException("Failed to send mail", e); } - //Email here + return true; }