# \[Logstash 2.4.1\] Emails doesn't sent directly

**URL:** https://discuss.elastic.co/t/logstash-2-4-1-emails-doesnt-sent-directly/89664
**Category:** Logstash
**Created:** [June 16, 2017, 7:32am UTC](https://discuss.elastic.co/t/logstash-2-4-1-emails-doesnt-sent-directly/89664 "2017-06-16T07:32:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![t.h](https://avatars.discourse-cdn.com/v4/letter/t/b5e925/32.png) [@t.h](https://discuss.elastic.co/u/t.h)
#### Post date: [June 16, 2017, 7:32am UTC](https://discuss.elastic.co/t/logstash-2-4-1-emails-doesnt-sent-directly/89664/1 "2017-06-16T07:32:34Z")

</div>

Hello,

I am upgrade logstash from 1.5.4 to 2.4.1. I am not sure it is an new or old error.

In my output section i have email section defined. I am simluated log-Messages in a while loop.

I can see in this simulations, I don't get the newest message per mail. I get evertime the message older before.

If I am generate not a loop only one message, then I don't get any email.

It looks like logstash cached one email.

What I am doing wrong? Can I am flush the output task, to send the cached email directly?

---

<div class="post-metadata">

### Author: ![t.h](https://avatars.discourse-cdn.com/v4/letter/t/b5e925/32.png) [@t.h](https://discuss.elastic.co/u/t.h)
#### Post date: [June 16, 2017, 12:59pm UTC](https://discuss.elastic.co/t/logstash-2-4-1-emails-doesnt-sent-directly/89664/2 "2017-06-16T12:59:51Z")

</div>

Hello,

I made a rollback to v1.5.4 and on this version get the email very fast.

On v2.4.1 get only the mail before

My test:

`
while true; do d="$(date +"%H:%M:%S")"; echo $d; echo '2017-06-16 '${d}',174: ERROR: Feed_mvz_xx_import_wb_oru.HL7Task_ahl7 - Multiple rows were found for one' >>/var/log/feeds/logstash_test/feed.log; sleep 70; done
14:50:39
14:51:49
14:52:59`

On 14:51:39 i got the eMail from 14:50:39  
On 14:52:59 I got the email from 14:51:49

I can make the sleep longer, but it doesn't change anything.

If I am stopping my while-loop, then i will get never the last email.

Any ideas?

Thomas

---

<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: [July 14, 2017, 12:59pm UTC](https://discuss.elastic.co/t/logstash-2-4-1-emails-doesnt-sent-directly/89664/3 "2017-07-14T12:59:55Z")

</div>

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