# Failed to execute action \[email\_watch/send \_email\]

**URL:** <https://discuss.elastic.co/t/failed-to-execute-action-email-watch-send-email/128236>\
**Category:** Elasticsearch\
**Created:** [April 16, 2018, 5:59pm UTC](https://discuss.elastic.co/t/failed-to-execute-action-email-watch-send-email/128236 "2018-04-16T17:59:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaishali1](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vaishali1](https://discuss.elastic.co/u/vaishali1)\
**Post date:** [April 16, 2018, 5:59pm UTC](https://discuss.elastic.co/t/failed-to-execute-action-email-watch-send-email/128236/1 "2018-04-16T17:59:15Z")

</div>

Hi,

I am facing issue in elasticsearch, can anyone help me out to solve this issue?  
Basically I am using company email.

**elasticsearch.yml**

```auto
xpack.notification.email.account:
    outlook_account:
        profile: outlook
        smtp:
            auth: true
            starttls.enable: true
            host: smtp-mail.outlook.com
            port: 587

```

**Output:**

```auto
[2018-04-16T13:57:47,749][ERROR][o.e.x.w.a.e.ExecutableEmailAction] [7vaxZFe] failed to execute action [email_watch/send
_email]
javax.mail.MessagingException: failed to send email with subject [Watcher Notification] via account [outlook_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.
2.jar:6.2.2]
        at org.elasticsearch.xpack.watcher.execution.ExecutionService.executeInner(ExecutionService.java:492) ~[x-pack-w
atcher-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.watcher.execution.ExecutionService.execute(ExecutionService.java:322) ~[x-pack-watche
r-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.watcher.execution.ExecutionService.lambda$executeAsync$7(ExecutionService.java:426) ~
[x-pack-watcher-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.watcher.execution.ExecutionService$WatchExecutionTask.run(ExecutionService.java:580)
[x-pack-watcher-6.2.2.jar:6.2.2]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573)
[elasticsearch-6.2.2.jar:6.2.2]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: javax.mail.AuthenticationFailedException: failed to connect, no password specified?
        at javax.mail.Service.connect(Service.java:400) ~[?:?]
        at org.elasticsearch.xpack.watcher.notification.email.Account.lambda$executeConnect$2(Account.java:166) ~[?:?]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_144]
        at org.elasticsearch.xpack.watcher.notification.email.Account.executeConnect(Account.java:165) ~[?:?]
        at org.elasticsearch.xpack.watcher.notification.email.Account.send(Account.java:124) ~[?:?]
        at org.elasticsearch.xpack.watcher.notification.email.EmailService.send(EmailService.java:110) ~[?:?]

```

---

<div class="post-metadata">

**Author:** ![Sherry\_Ger](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@Sherry\_Ger](https://discuss.elastic.co/u/Sherry_Ger)\
**Post date:** [April 20, 2018, 6:05pm UTC](https://discuss.elastic.co/t/failed-to-execute-action-email-watch-send-email/128236/2 "2018-04-20T18:05:02Z")

</div>

It looks like you are missing user and password. Please see [configuring email accounts](https://www.elastic.co/guide/en/x-pack/current/actions-email.html#configuring-email) for details.

---

<div class="post-metadata">

**Author:** ![vaishali1](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vaishali1](https://discuss.elastic.co/u/vaishali1)\
**Post date:** [April 20, 2018, 6:18pm UTC](https://discuss.elastic.co/t/failed-to-execute-action-email-watch-send-email/128236/3 "2018-04-20T18:18:44Z")

</div>

Thank you so much for your reply, I provided the password as well still it wasn't working.

---

<div class="post-metadata">

**Author:** ![Albert\_Zaharovits](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/albert_zaharovits/32/24390_2.png) [@Albert\_Zaharovits](https://discuss.elastic.co/u/Albert_Zaharovits)\
**Post date:** [April 22, 2018, 4:24pm UTC](https://discuss.elastic.co/t/failed-to-execute-action-email-watch-send-email/128236/4 "2018-04-22T16:24:21Z")

</div>

@vaishali1 can you please check the logs, I think now the stacktrace of the failure should be different.

---

<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 20, 2018, 4:24pm UTC](https://discuss.elastic.co/t/failed-to-execute-action-email-watch-send-email/128236/5 "2018-05-20T16:24:36Z")

</div>

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