Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Email 如何在logstash输出电子邮件中附加附件?_Email_Logstash - Fatal编程技术网

Email 如何在logstash输出电子邮件中附加附件?

Email 如何在logstash输出电子邮件中附加附件?,email,logstash,Email,Logstash,在指南格式中,他们说附件使用数组。 然而,在格式和电子邮件似乎已经发送,但没有在它的附件 有人知道如何在logstash电子邮件输出中使用附件选项吗 output { if "shouldmail" in [tags] { email { to => 'technical@example.com' from => 'monitor@example.com' subject => 'Alert - %{title}' body => "Tags: %{tags

在指南格式中,他们说附件使用数组。 然而,在格式和电子邮件似乎已经发送,但没有在它的附件

有人知道如何在logstash电子邮件输出中使用附件选项吗

output {
if "shouldmail" in [tags] {
email {
  to => 'technical@example.com'
  from => 'monitor@example.com'
  subject => 'Alert - %{title}'
 body => "Tags: %{tags}\\n\\Content:\\n%{message}"
 template_file => "/tmp/email_template.mustache"
 domain => 'mail.example.com'
 attachment => ["C:\picture.jpg"]
 port => 25
  }
 }
}

使用附件代替附件

output {
if "shouldmail" in [tags] {
email {
  to => 'technical@example.com'
  from => 'monitor@example.com'
  subject => 'Alert - %{title}'
 body => "Tags: %{tags}\\n\\Content:\\n%{message}"
 template_file => "/tmp/email_template.mustache"
 domain => 'mail.example.com'
 attachments => ["C:\picture.jpg"]
 port => 25
  }
 }
}

您好,我使用上述示例,但收到的电子邮件中仍然没有任何附件。数组是否需要提供除文件路径以外的其他元素?