# Need help for send email in Watches

**URL:** https://forum.search-guard.com/t/need-help-for-send-email-in-watches/1956
**Category:** Signals Alerting
**Created:** [September 10, 2020, 7:38am UTC](https://forum.search-guard.com/t/need-help-for-send-email-in-watches/1956 "2020-09-10T07:38:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Funky89](https://avatars.discourse-cdn.com/v4/letter/f/51bf81/32.png) [@Funky89](https://forum.search-guard.com/u/Funky89)
#### Post date: [September 10, 2020, 7:38am UTC](https://forum.search-guard.com/t/need-help-for-send-email-in-watches/1956/1 "2020-09-10T07:38:30Z")

</div>

**Elasticsearch version:** 7.9.0

**Server OS version:** Debian 10

**Kibana version (if relevant):** 7.9.0

**Browser version (if relevant):** Firefox

**Browser OS version (if relevant):** 80.0.1

**Describe the issue:**

Hello everyone,

I would like to use the send email by alert but I have an error message :

 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/0af38e6ef62f224efb7a6da91c84a0c1930c92ec.png)

 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/5ecbeeea8eb1e3d54b363ebe1a8b0f7e2462d6ff.png)

Now my Watches config:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/c4493111ac1579c5ef952dc870b615520bed946f.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/32756924026735d71c39e4ca4440c0157daab881.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/87f350b96ae30e8ad6bb5e754f60e8eace5da942.png)

And my account :

 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/42a5158af01976a0d90c4f92c020f00ffacd8560.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/159b0e9afbb91bc56b2a083fd0367da229d4c585.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/469f27cbb840fc1573b6ab45fb865c97539a7b84.png)

The smtp works fine from debian with sendmail and this is the correct configuration of my account

Can you tell me where my mistake came from? Should I install sendmail on the elastic server? Or it should work with SearchGuard ?

Cordially,

Benjamin

---

<div class="post-metadata">

### Author: ![srgbnd](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/srgbnd/32/506_2.png) [@srgbnd](https://forum.search-guard.com/u/srgbnd)
#### Post date: [September 10, 2020, 8:58am UTC](https://forum.search-guard.com/t/need-help-for-send-email-in-watches/1956/2 "2020-09-10T08:58:32Z")

</div>

Hi. The Signals should work with a remote mail server. You should have error(s) in the Elasticsearch log, please post the log here.

Also, please retrieve the watch document and post it here too.

If multitenancy is enabled.

```bash
curl -k -u admin:admin -X GET https://localhost:9200/_signals/watch/{tenant}/{watch_id}

```

If multitenancy is disabled.

```bash
curl -k -u admin:admin -X GET https://localhost:9200/_signals/watch/_main/{watch_id}

```

> **[Get Watch](https://docs.search-guard.com/latest/elasticsearch-alerting-rest-api-watch-get)**
>
> Use the Alerting for Elasticsearch Get Watch API to retrieve configured watches by watch ID

---

<div class="post-metadata">

### Author: ![Funky89](https://avatars.discourse-cdn.com/v4/letter/f/51bf81/32.png) [@Funky89](https://forum.search-guard.com/u/Funky89)
#### Post date: [September 10, 2020, 9:51am UTC](https://forum.search-guard.com/t/need-help-for-send-email-in-watches/1956/3 "2020-09-10T09:51:16Z")

</div>

Hi srgbnd

For the log on Elasticsearch :

 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/c29f30aabf9ec88994bbebcfe1cf0baab05b7570.png)

Kibana log :

 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/6aacaf7bc3938ac314a6ab1f5f3513a8950daf33.png)  
And when i try with

```auto
curl -k -u admin:admin -X GET https://localhost:9200/_signals/watch/{tenant}/{watch_id}

```

i have this :

 ![image](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/1bbaf43803625369bd9bbe2df8f6257596df5ebe.png)

For my tests I am in http and not in https, we need to have the SSL ?

EDIT : Ok i see my mistake… Is worked now, Thanks you srgbnd wrong TLS on my email

---

<div class="post-metadata">

### Author: ![cstaley](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/cstaley/32/463_2.png) [@cstaley](https://forum.search-guard.com/u/cstaley)
#### Post date: [September 10, 2020, 10:05am UTC](https://forum.search-guard.com/t/need-help-for-send-email-in-watches/1956/4 "2020-09-10T10:05:50Z")

</div>

This seems to be a bug that is ocurring when using TLS enabled email accounts. As a workaround, try to set `*` as trusted host or the host name of the mail server noted in its TLS certificate.

See for details: [com.sun.mail.smtp (JavaMail API documentation)](https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html#mail.smtp.ssl.trust)
