# Logstash email output occur below error: \<Errno::EPIPE: Broken pipe - No message available\>

**URL:** <https://discuss.elastic.co/t/logstash-email-output-occur-below-error-errno-broken-pipe-no-message-available/304301>\
**Category:** Logstash\
**Created:** [May 10, 2022, 3:23am UTC](https://discuss.elastic.co/t/logstash-email-output-occur-below-error-errno-broken-pipe-no-message-available/304301 "2022-05-10T03:23:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![haohao6683](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haohao6683/32/105465_2.png) [@haohao6683](https://discuss.elastic.co/u/haohao6683)\
**Post date:** [May 10, 2022, 3:23am UTC](https://discuss.elastic.co/t/logstash-email-output-occur-below-error-errno-broken-pipe-no-message-available/304301/1 "2022-05-10T03:23:40Z")

</div>

Hi all,  
I am currently using Logstash-email output with the following configuration: (version: 7.3.1)

```auto
email {
          from => "sender@qq.com"
          subject => "Ignore (test run)"
          body => "log-message: Ignore (test run)"
          to => "receiver@qq.com"
          codec => "plain"
          contenttype => "text/plain; charset=UTF-8"
          address => "smtp.qq.com"
          port => "587"
          authentication => "plain"
          via => "sendmail"
          username => "sender@qq.com"
          password => "password"
          use_tls => true
    }

```

And the log of Logstash will shown as below:

```auto
[2022-05-10T03:19:14,397][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}
[2022-05-10T03:19:39,582][ERROR][logstash.outputs.email] Something happen while delivering an email {:exception=>#<Errno::EPIPE: Broken pipe - No message available>}
[2022-05-10T03:19:41,146][ERROR][logstash.outputs.email] Something happen while delivering an email {:exception=>#<Errno::EPIPE: Broken pipe - No message available>}
[2022-05-10T03:19:41,261][ERROR][logstash.outputs.email] Something happen while delivering an email {:exception=>#<Errno::EPIPE: Broken pipe - No message available>}

```

I also tried set up another output to Elasticsearch, and the data can be transferred to ES successfully, but just email would not work, could you guys help on this? Thanks much!

---

<div class="post-metadata">

**Author:** ![haohao6683](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haohao6683/32/105465_2.png) [@haohao6683](https://discuss.elastic.co/u/haohao6683)\
**Post date:** [May 10, 2022, 6:47am UTC](https://discuss.elastic.co/t/logstash-email-output-occur-below-error-errno-broken-pipe-no-message-available/304301/2 "2022-05-10T06:47:46Z")

</div>

Also tried switch to another mail sevice provider: "[smtp.office365.com](http://smtp.office365.com)", received the same "No message available" error as well.

```auto
email {
          from => "sender@hotmail.com"
          subject => "Ignore (test run)"
          body => "log-message: Ignore (test run)"
          to => "receiver@outlook.com"
          codec => "plain"
          contenttype => "text/plain; charset=UTF-8"
          address => "smtp.office365.com"
          port => 587
          authentication => "plain"
          via => "sendmail"
          username => "sender@hotmail.com"
          password => "password"
          use_tls => true
          debug => true
    }

```

```auto
[2022-05-10T06:39:30,616][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}
[2022-05-10T06:39:38,941][ERROR][logstash.outputs.email] Something happen while delivering an email {:exception=>#<Errno::EPIPE: Broken pipe - No message available>}
[2022-05-10T06:39:39,000][ERROR][logstash.outputs.email] Something happen while delivering an email {:exception=>#<Errno::EPIPE: Broken pipe - No message available>}
[2022-05-10T06:39:40,264][ERROR][logstash.outputs.email] Something happen while delivering an email {:exception=>#<Errno::EPIPE: Broken pipe - No message available>}

```

---

<div class="post-metadata">

**Author:** ![haohao6683](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haohao6683/32/105465_2.png) [@haohao6683](https://discuss.elastic.co/u/haohao6683)\
**Post date:** [May 10, 2022, 7:31am UTC](https://discuss.elastic.co/t/logstash-email-output-occur-below-error-errno-broken-pipe-no-message-available/304301/3 "2022-05-10T07:31:20Z")

</div>

Don't know if the below issue could help for the troubleshooting, just noted it here.  
And if I set the attribue "via" to the default value "smtp", then it keep altering another error as below:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b4aa95c8452c538ab6d5e86d3708a88ea541655c.png)

```auto
email {
          via => "smtp"
    }

```

```auto
[2022-05-10T07:29:07,008][ERROR][logstash.outputs.email] Something happen while delivering an email {:exception=>#<EOFError: end of file reached>}
[2022-05-10T07:29:18,111][ERROR][logstash.outputs.email] Something happen while delivering an email {:exception=>#<EOFError: end of file reached>}
[2022-05-10T07:29:29,216][ERROR][logstash.outputs.email] Something happen while delivering an email {:exception=>#<EOFError: end of file reached>}
[2022-05-10T07:29:40,365][ERROR][logstash.outputs.email] Something happen while delivering an email {:exception=>#<EOFError: end of file reached>}

```

Looking forward your reply, many thanks!

---

<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:** [June 7, 2022, 7:31am UTC](https://discuss.elastic.co/t/logstash-email-output-occur-below-error-errno-broken-pipe-no-message-available/304301/4 "2022-06-07T07:31:47Z")

</div>

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