# Logstash email output

**URL:** <https://discuss.elastic.co/t/logstash-email-output/277538>\
**Category:** Logstash\
**Created:** [July 1, 2021, 10:14am UTC](https://discuss.elastic.co/t/logstash-email-output/277538 "2021-07-01T10:14:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khairul\_Anuar\_bin\_Ab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khairul_anuar_bin_ab/32/49908_2.png) [@Khairul\_Anuar\_bin\_Ab](https://discuss.elastic.co/u/Khairul_Anuar_bin_Ab)\
**Post date:** [July 1, 2021, 10:14am UTC](https://discuss.elastic.co/t/logstash-email-output/277538/1 "2021-07-01T10:14:18Z")

</div>

I'm trying to send an email using logstash, however logstash keep sending the same email every minutes. The output configuration as per below. Any ideas what went wrong?

```auto
output {
email {
  to => "zyx@gmail.com"
  body => "Here is the event line that occured: %{message}"
  address => "smtp.gmail.com"
  port => 587
  username => "xyz@gmail.com"
  password => "mypass"
  use_tls => true
}

```

---

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [July 14, 2021, 4:29pm UTC](https://discuss.elastic.co/t/logstash-email-output/277538/2 "2021-07-14T16:29:30Z")

</div>

The schedule is usually defined by the input.  
If your input is the same very minute then logstash will output the same thing every minute.  
Does your input run every minute? Is it the same input?

Have you tested this with just writing to a file first before sending an email?

---

<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:** [August 11, 2021, 4:30pm UTC](https://discuss.elastic.co/t/logstash-email-output/277538/3 "2021-08-11T16:30:05Z")

</div>

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