# Watcher EmailAction throwing Exception

**URL:** <https://discuss.elastic.co/t/watcher-emailaction-throwing-exception/223698>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [March 16, 2020, 6:52am UTC](https://discuss.elastic.co/t/watcher-emailaction-throwing-exception/223698 "2020-03-16T06:52:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prathibha](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@prathibha](https://discuss.elastic.co/u/prathibha)\
**Post date:** [March 16, 2020, 6:52am UTC](https://discuss.elastic.co/t/watcher-emailaction-throwing-exception/223698/1 "2020-03-16T06:52:42Z")

</div>

Hello Team,  
Version Used: 7.4  
I am facing the following issue while working with Elasticsearch watcher Email Action .

```auto
"condition": {
      "type": "compare",
      "status": "success",
      "met": true,
      "compare": {
        "resolved_values": {
          "ctx.payload.hits.total": 38
        }
      }
    },
    "actions": [
      {
        "id": "log",
        "type": "logging",
        "status": "success",
        "logging": {
          "logged_text": "WARNING ON eaas index executed at 2020-03-16T06:33:15.652Z"
        }
      },
      {
        "id": "send_email",
        "type": "email",
        "status": "failure",
        "error": {
          "root_cause": [
            {
              **"type": "settings_exception",**
**"reason": "missing required email account setting for account [gmail_account]. 'smtp.host' must be configured**"
            }
          ],
          "type": "settings_exception",
          "reason": "missing required email account setting for account [gmail_account]. 'smtp.host' must be configured"
        }
      }
    ]
  },
  "messages": []

I have used below configuration in elasticsearch.yml file to do this
xpack.notification.email.account:
    outlook_account:
        profile: outlook
        smtp:
            auth: true
            starttls.enable: true
            host: smtp-mail.outlook.com
            port: 587
            user: email.address

I am facing issue due to 'gmail' eventhough I have used outlook in configuration file.One thing that i have started to try this with gmail account and later changed it into outlook. I have restarted the services after this. Do I need to update anything else here to solve this. It would be great to help me out on this. Please let me know if I need to share more info on this.
```

---

<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:** [March 16, 2020, 1:42pm UTC](https://discuss.elastic.co/t/watcher-emailaction-throwing-exception/223698/2 "2020-03-16T13:42:39Z")

</div>

you have configured an email account named `outlook_account` (which can be an arbitrary name), you refer in your watch to an account named `gmail_account `

Also make sure you update your confguration on all nodes and restart, if you are using the configuration file.

---

<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:** [April 13, 2020, 1:42pm UTC](https://discuss.elastic.co/t/watcher-emailaction-throwing-exception/223698/3 "2020-04-13T13:42:47Z")

</div>

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