# How to get meassages and send them by email

**URL:** <https://discuss.elastic.co/t/how-to-get-meassages-and-send-them-by-email/294893>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [January 20, 2022, 6:17am UTC](https://discuss.elastic.co/t/how-to-get-meassages-and-send-them-by-email/294893 "2022-01-20T06:17:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrrr](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rrrr](https://discuss.elastic.co/u/rrrr)\
**Post date:** [January 20, 2022, 6:17am UTC](https://discuss.elastic.co/t/how-to-get-meassages-and-send-them-by-email/294893/1 "2022-01-20T06:17:26Z")

</div>

In the watcher, how to get all messages and send them by email

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/e/3e4516d627961e5f5808a33c7c1f37b1813450d7.png)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 20, 2022, 6:31am UTC](https://discuss.elastic.co/t/how-to-get-meassages-and-send-them-by-email/294893/2 "2022-01-20T06:31:03Z")

</div>

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with `</>` icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

---

<div class="post-metadata">

**Author:** ![rrrr](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rrrr](https://discuss.elastic.co/u/rrrr)\
**Post date:** [January 20, 2022, 7:07am UTC](https://discuss.elastic.co/t/how-to-get-meassages-and-send-them-by-email/294893/3 "2022-01-20T07:07:18Z")

</div>

"actions": {  
"email\_admin": {  
"email": {  
"profile": "standard",  
"to": [  
"[tome-LH@qq.com](mailto:tome-LH@qq.com)"  
],  
"subject": "alert Watcher Notification",  
"body": {  
"html": "{{ctx.payload.hits.hits.0.\_source.message}}"  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![rrrr](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rrrr](https://discuss.elastic.co/u/rrrr)\
**Post date:** [January 20, 2022, 7:09am UTC](https://discuss.elastic.co/t/how-to-get-meassages-and-send-them-by-email/294893/4 "2022-01-20T07:09:49Z")

</div>

I want to receive multiple messages. I don't know how to set them，  
ctx.payload.hits.hits.0.\_source.message-----\>I wrote it and received a message

---

<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:** [February 17, 2022, 7:10am UTC](https://discuss.elastic.co/t/how-to-get-meassages-and-send-them-by-email/294893/5 "2022-02-17T07:10:42Z")

</div>

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