# Dynamic email sending with logstash

**URL:** <https://discuss.elastic.co/t/dynamic-email-sending-with-logstash/321536>\
**Category:** Logstash\
**Created:** [December 19, 2022, 9:31am UTC](https://discuss.elastic.co/t/dynamic-email-sending-with-logstash/321536 "2022-12-19T09:31:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pramila\_niroshan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pramila_niroshan/32/114909_2.png) [@pramila\_niroshan](https://discuss.elastic.co/u/pramila_niroshan)\
**Post date:** [December 19, 2022, 9:31am UTC](https://discuss.elastic.co/t/dynamic-email-sending-with-logstash/321536/1 "2022-12-19T09:31:45Z")

</div>

Is there a way to send a email from logs?

That's meant whenever we found a email address from our log then we extract that email address and send to that address to mail.

(We use log4j2 and MDC to write the log file)

---

<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:** [January 16, 2023, 9:32am UTC](https://discuss.elastic.co/t/dynamic-email-sending-with-logstash/321536/2 "2023-01-16T09:32:31Z")

</div>

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