# Watcher: ERROR with multiple emails in to/cc fields via template

**URL:** <https://discuss.elastic.co/t/watcher-error-with-multiple-emails-in-to-cc-fields-via-template/100496>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [September 14, 2017, 9:32am UTC](https://discuss.elastic.co/t/watcher-error-with-multiple-emails-in-to-cc-fields-via-template/100496 "2017-09-14T09:32:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pabloc](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@pabloc](https://discuss.elastic.co/u/pabloc)\
**Post date:** [September 14, 2017, 9:32am UTC](https://discuss.elastic.co/t/watcher-error-with-multiple-emails-in-to-cc-fields-via-template/100496/1 "2017-09-14T09:32:29Z")

</div>

Hello,  
I'm experiencing the exact problem detailed in the bellow which seems to be closed with no solution.

> [@X-Pack Watcher: multiple emails in to/cc fields via template](https://discuss.elastic.co/t/x-pack-watcher-multiple-emails-in-to-cc-fields-via-template/76058):
>
> Hello all, Brief intro: I'm creating watcher alerts with send email actions. Email fields TO and CC are calculatable, so known only after watch execution and can be transformed before the action. As noted in the documentation here to field can be either array or email address from template [https://www.elastic.co/guide/en/x-pack/current/actions-email.html#email-action-attributes](https://www.elastic.co/guide/en/x-pack/current/actions-email.html#email-action-attributes) . Am I right, that I have no chance to format an output with Mustache template with several emails to be successful…

I'm running version 2.4.1.

Any news on this?

Thank you.

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [September 19, 2017, 12:17am UTC](https://discuss.elastic.co/t/watcher-error-with-multiple-emails-in-to-cc-fields-via-template/100496/2 "2017-09-19T00:17:17Z")

</div>

If you're running Elasticsearch 2.4.1 you must be running Kibana 4.6.?

I've been using watcher since 5.0.0 to email a PDF report with multiple email addresses like this (but I haven't used Mustache templates to build the email list);

```auto
        "actions": {
          "email_admin": {
            "email": {
              "to": ["lee.d@elastic.co","watch-123-test@gmail.com"],

```

---

<div class="post-metadata">

**Author:** ![pabloc](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@pabloc](https://discuss.elastic.co/u/pabloc)\
**Post date:** [October 8, 2017, 12:58pm UTC](https://discuss.elastic.co/t/watcher-error-with-multiple-emails-in-to-cc-fields-via-template/100496/3 "2017-10-08T12:58:54Z")

</div>

The problem is with the Mustache template.

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [October 9, 2017, 7:46pm UTC](https://discuss.elastic.co/t/watcher-error-with-multiple-emails-in-to-cc-fields-via-template/100496/4 "2017-10-09T19:46:14Z")

</div>

I re-opened this topic [X-Pack Watcher: multiple emails in to/cc fields via template](https://discuss.elastic.co/t/x-pack-watcher-multiple-emails-in-to-cc-fields-via-template/76058/7)

If you'd like to ask about any status updates on it. Or add information.

Thanks,  
Lee

---

<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:** [November 6, 2017, 7:46pm UTC](https://discuss.elastic.co/t/watcher-error-with-multiple-emails-in-to-cc-fields-via-template/100496/5 "2017-11-06T19:46:24Z")

</div>

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