版本: 6.8-8.9
简而言之,当Watcher操作或Alerting操作的email部分缺少"to"字段时,会发生此错误。Elasticsearch需要此字段来知道将邮件发送到何处。要解决此问题,您可以在操作配置中添加带有有效电子邮件地址的"to"字段,或者如果您使用默认电子邮件,请确保它在Elasticsearch设置中正确设置。此外,检查配置中可能导致"to"字段被忽略的任何语法错误。
日志上下文 #
日志"missing required email [to] field"的类名是 Account.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入了解的人参考:
// applying the defaults on missing emails fields
email = config.defaults.apply(email);
if (email.to == null) {
throw new SettingsException("missing required email [to] field");
}
Transport transport = session.getTransport(SMTP_PROTOCOL);
String user = auth != null ? auth.user() : config.smtp.user;





