# Problem configuring Gmail account for watcher

**URL:** <https://discuss.elastic.co/t/problem-configuring-gmail-account-for-watcher/138985>\
**Category:** Elasticsearch\
**Created:** [July 6, 2018, 10:03pm UTC](https://discuss.elastic.co/t/problem-configuring-gmail-account-for-watcher/138985 "2018-07-06T22:03:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rob2](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@Rob2](https://discuss.elastic.co/u/Rob2)\
**Post date:** [July 6, 2018, 10:03pm UTC](https://discuss.elastic.co/t/problem-configuring-gmail-account-for-watcher/138985/1 "2018-07-06T22:03:21Z")

</div>

I'm following the info at [Configuring Watcher to Send Email | Elasticsearch Watcher [2.4] | Elastic](https://www.elastic.co/guide/en/watcher/current/email-services.html#gmail)

Placing in elasticsearch.yml the following:

```
watcher.actions.email.service.account:
    gmail_account:
        profile: gmail
        smtp:
            auth: true
            starttls.enable: true
            host: smtp.gmail.com
            port: 587
            user: <username>
            password: <password>

```

trying with username in both the form [xyz@gmail.com](mailto:xyz@gmail.com) and just xyz.  
The gmail account is configured to "Allow Less Secure Apps" and two-step verification is off.

But when I restart the Elasticsearch service, errors occur:

> org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting \> [watcher.actions.email.service.account.gmail\_account.smtp.starttls.enable] please check that any required plugins are installed, or check the breaking changes documentation for removed settings  
> at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:344) ~[elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:308) ~[elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:282) ~[elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.common.settings.SettingsModule.(SettingsModule.java:135) ~[elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.node.Node.(Node.java:339) ~[elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.node.Node.(Node.java:252) ~[elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) [elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) [elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) [elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.3.0.jar:6.3.0]  
> at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.3.0.jar:6.3.0]  
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) [elasticsearch-6.3.0.jar:6.3.0]  
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) [elasticsearch-6.3.0.jar:6.3.0]

repeated for the other watcher.actions.email.service.account.gmail\_account.\* fields.

When I tried with an Exchange server account instead, using the info at [Configuring Watcher to Send Email | Elasticsearch Watcher [2.4] | Elastic](https://www.elastic.co/guide/en/watcher/current/email-services.html#exchange), that worked, but I haven't been able to get the Gmail configuration to work.

---

<div class="post-metadata">

**Author:** ![Rob2](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@Rob2](https://discuss.elastic.co/u/Rob2)\
**Post date:** [July 6, 2018, 10:24pm UTC](https://discuss.elastic.co/t/problem-configuring-gmail-account-for-watcher/138985/2 "2018-07-06T22:24:29Z")

</div>

Realized my error. I must have originally copy-pasted the Gmail configuration settings from an older version of the docs at [Configuring Watcher to Send Email | Elasticsearch Watcher [2.4] | Elastic](https://www.elastic.co/guide/en/watcher/current/email-services.html)

> watcher.actions.email.service.account:

should now be:

> xpack.notification.email.account:

It seems to be working now.

---

<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:** [August 3, 2018, 10:26pm UTC](https://discuss.elastic.co/t/problem-configuring-gmail-account-for-watcher/138985/3 "2018-08-03T22:26:28Z")

</div>

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