# Watcher Failed to send e-mail to user@mydomain.com

**URL:** https://discuss.elastic.co/t/watcher-failed-to-send-e-mail-to-user-mydomain-com/126667
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [April 4, 2018, 4:06am UTC](https://discuss.elastic.co/t/watcher-failed-to-send-e-mail-to-user-mydomain-com/126667 "2018-04-04T04:06:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Unknown\_error](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@Unknown\_error](https://discuss.elastic.co/u/Unknown_error)
#### Post date: [April 4, 2018, 4:06am UTC](https://discuss.elastic.co/t/watcher-failed-to-send-e-mail-to-user-mydomain-com/126667/1 "2018-04-04T04:06:42Z")

</div>

**this config on elasticsearch.yml**  
**================================================================**  
**bootstrap.memory\_lock: false**  
**cluster.name: elasticsearch**  
**http.port: 9200**  
**network.host: 0.0.0.0**  
**node.data: true**  
**node.ingest: true**  
**node.master: true**  
**node.max\_local\_storage\_nodes: 1**  
**node.name: ELKWIN7**  
**path.data: C:\ProgramData\Elastic\Elasticsearch\data**  
**path.logs: C:\ProgramData\Elastic\Elasticsearch\logs**  
**transport.tcp.port: 9300**  
**xpack.license.self\_generated.type: trial**  
**xpack.notification.email.account:**  
\*\* gmail\_account:\*\*  
\*\* profile: gmail\*\*  
\*\* smtp:\*\*  
\*\* auth: true\*\*  
\*\* starttls.enable: true\*\*  
\*\* host: [smtp.gmail.com](http://smtp.gmail.com)\*\*  
\*\* port: 587\*\*  
\*\* user: [myuser@gmail.com](mailto:myuser@gmail.com)\*\*  
\*\* password: xxxx\*\*  
**=================================================================**

**this error log on elasticsearch**  
**===========================================================================**  
**[2018-04-04T10:50:52,847][ERROR][o.e.x.w.a.e.ExecutableEmailAction] [ELKWIN7] failed to execute action [_inlined_/email\_1]**  
**javax.mail.MessagingException: failed to send email with subject [Watch [peak] has exceeded the threshold] via account [gmail\_account]**  
\*\* at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:112) ~[?:?]\*\*  
\*\* at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:104) ~[?:?]\*\*  
\*\* at org.elasticsearch.xpack.watcher.actions.email.ExecutableEmailAction.execute(ExecutableEmailAction.java:84) ~[?:?]\*\*  
\*\* at org.elasticsearch.xpack.core.watcher.actions.ActionWrapper.execute(ActionWrapper.java:156) [x-pack-core-6.2.3.jar:6.2.3]\*\*  
\*\* at org.elasticsearch.xpack.watcher.execution.ExecutionService.executeInner(ExecutionService.java:492) [x-pack-watcher-6.2.3.jar:6.2.3]\*\*  
\*\* at org.elasticsearch.xpack.watcher.execution.ExecutionService.execute(ExecutionService.java:322) [x-pack-watcher-6.2.3.jar:6.2.3]\*\*  
\*\* at org.elasticsearch.xpack.watcher.transport.actions.execute.TransportExecuteWatchAction$1.doRun(TransportExecuteWatchAction.java:165) [x-pack-watcher-6.2.3.jar:6.2.3]\*\*  
\*\* at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.3.jar:6.2.3]\*\*  
\*\* at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) [?:?]\*\*  
\*\* at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]\*\*  
\*\* at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573) [elasticsearch-6.2.3.jar:6.2.3]\*\*  
\*\* at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) [?:?]\*\*  
\*\* at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) [?:?]\*\*  
\*\* at java.lang.Thread.run(Thread.java:844) [?:?]\*\*  
**Caused by: javax.mail.AuthenticationFailedException: 534-5.7.14 \<[https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbvo](https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbvo)**  
**534-5.7.14 90Kh2d6KCME5Z0RHy1IhzDhkQjoSIbXlFk4T2Gh6STWbvR8N3lj\_I0yTft8\_E8SwNSjcAi**  
**534-5.7.14 F6QxjkJ3UhGBKEXK7hhsOuoVlm9m9XycHoMYwx6oaawo0t0oxh-4nliUh5vEKZ2nmnw1PI**  
**534-5.7.14 RAH5eRZe6-DYChdTNsOTraXlQ0jx8M7CZnUt1I8yKVnd40Cnunr2US-x0prWyvRoKbr7s3**  
**534-5.7.14 6G1Gt20BM\_Wart7UDIEnk7rXn148A\> Please log in via your web browser and**  
**534-5.7.14 then try again.**  
**534-5.7.14 Learn more at**  
**534 5.7.14 [https://support.google.com/mail/answer/78754](https://support.google.com/mail/answer/78754) m1sm8477372pfi.80 - gsmtp**  
**==========================================================================**

**this i click Test fire an e-mail on this picture**

 ![x](https://us1.discourse-cdn.com/elastic/original/3X/6/9/696f7735844d1fac8475dc55bd181fb565683d0a.PNG)

I proof my email password by login successfully at gmail, it done.

**please help me, thanks**

---

<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: [April 4, 2018, 7:26am UTC](https://discuss.elastic.co/t/watcher-failed-to-send-e-mail-to-user-mydomain-com/126667/2 "2018-04-04T07:26:04Z")

</div>

please take a look at the exception again, as google provides a link to guide you through setting up your gmail account properly to allow sending mails from third party applications.

See also [https://www.elastic.co/guide/en/x-pack/6.2/actions-email.html#gmail](https://www.elastic.co/guide/en/x-pack/6.2/actions-email.html#gmail)

---

<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: [May 2, 2018, 7:26am UTC](https://discuss.elastic.co/t/watcher-failed-to-send-e-mail-to-user-mydomain-com/126667/3 "2018-05-02T07:26:22Z")

</div>

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