Alerting : connect email
The last commit ommited a line that actually sends the email on alert trigger. Original commit: elastic/x-pack-elasticsearch@24b5c01db8
This commit is contained in:
parent
5f84596c92
commit
940d6402ae
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue