# Non multi-part Emails with Watch Email Action

**URL:** <https://discuss.elastic.co/t/non-multi-part-emails-with-watch-email-action/131348>\
**Category:** Elasticsearch\
**Created:** [May 10, 2018, 7:33pm UTC](https://discuss.elastic.co/t/non-multi-part-emails-with-watch-email-action/131348 "2018-05-10T19:33:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaronloesattv](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@aaronloesattv](https://discuss.elastic.co/u/aaronloesattv)\
**Post date:** [May 10, 2018, 7:33pm UTC](https://discuss.elastic.co/t/non-multi-part-emails-with-watch-email-action/131348/1 "2018-05-10T19:33:26Z")

</div>

We have a requirement to send automated emails to another monitoring system. We wanted to use watcher for this but unfortunately that second system cannot handle multi-part emails, only text/plain emails. I know its a stretch that xpack supports this, but I've looked through the configuration of cluster email settings and watch email action settings and i'm not seeing anything that will send a non-multi-part plain-text email. Is there any way to achieve this with the current implementation of xpack?

Our watch action does not supply a body.html, only a body.text and no attachments.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [May 11, 2018, 7:01am UTC](https://discuss.elastic.co/t/non-multi-part-emails-with-watch-email-action/131348/2 "2018-05-11T07:01:13Z")

</div>

Currently everything is treated as a MIME MultiPart, regardless if you specify text or HTML. See [https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Profile.java#L68-L85](https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/Profile.java#L68-L85)

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [May 11, 2018, 9:42am UTC](https://discuss.elastic.co/t/non-multi-part-emails-with-watch-email-action/131348/3 "2018-05-11T09:42:01Z")

</div>

Is there any possibility you can alert the system in a different way?

Also I was thinking to use a webhook to send data to logstash and then use the `email` output of logstash, but I think logstash is using multipart emails as well (my ruby skills are literally non-existing, so testing this might make sense). See [https://github.com/logstash-plugins/logstash-output-email/blob/master/lib/logstash/outputs/email.rb](https://github.com/logstash-plugins/logstash-output-email/blob/master/lib/logstash/outputs/email.rb)

---

<div class="post-metadata">

**Author:** ![aaronloesattv](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@aaronloesattv](https://discuss.elastic.co/u/aaronloesattv)\
**Post date:** [May 15, 2018, 2:32pm UTC](https://discuss.elastic.co/t/non-multi-part-emails-with-watch-email-action/131348/4 "2018-05-15T14:32:04Z")

</div>

Thank you. The only option is email for that system. Staring at the Logstash ruby code, it looks like it _may_ support plain/text email so if it comes to that, we'll give it a try. Not that this situation is a very common one (or generally desired) but maybe a feature enhancement to allow more fine grain controls of the email contents can be added to XPack? Seems like there are a bunch of legacy monitoring systems at large companies out there where email is the easiest integration.

Thank you for your help.

---

<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 12, 2018, 2:32pm UTC](https://discuss.elastic.co/t/non-multi-part-emails-with-watch-email-action/131348/5 "2018-06-12T14:32:08Z")

</div>

Closed on June 12, 2018, 2:32pm UTC

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