# How to attach an attachment in the logstash output email

**URL:** <https://discuss.elastic.co/t/how-to-attach-an-attachment-in-the-logstash-output-email/220530>\
**Category:** Logstash\
**Created:** [February 23, 2020, 5:37am UTC](https://discuss.elastic.co/t/how-to-attach-an-attachment-in-the-logstash-output-email/220530 "2020-02-23T05:37:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kc55](https://avatars.discourse-cdn.com/v4/letter/k/53a042/32.png) [@kc55](https://discuss.elastic.co/u/kc55)\
**Post date:** [February 23, 2020, 5:37am UTC](https://discuss.elastic.co/t/how-to-attach-an-attachment-in-the-logstash-output-email/220530/1 "2020-02-23T05:37:21Z")

</div>

Hi all,

In the guide format , they said the attachment is using array.  
However after the format and it seems the email has been sent but no attachment in it.

```
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
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 22, 2020, 5:37am UTC](https://discuss.elastic.co/t/how-to-attach-an-attachment-in-the-logstash-output-email/220530/2 "2020-03-22T05:37:28Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
