# Logstash-output-email Test

**URL:** <https://discuss.elastic.co/t/logstash-output-email-test/198133>\
**Category:** Logstash\
**Created:** [September 5, 2019, 1:25am UTC](https://discuss.elastic.co/t/logstash-output-email-test/198133 "2019-09-05T01:25:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VamPikmin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vampikmin/32/22367_2.png) [@VamPikmin](https://discuss.elastic.co/u/VamPikmin)\
**Post date:** [September 5, 2019, 1:25am UTC](https://discuss.elastic.co/t/logstash-output-email-test/198133/1 "2019-09-05T01:25:45Z")

</div>

We have an on-premises exchange server that I would like to use to send email notifications from logstash

Does anyone have a sample config I could use?

I know the ip of the exchange server, port 25 is open and if SMTP doesn't require authentication do I still need the username and password fields?

The following is not working for me 😕

```
email {
                        debug => 'true'
                        to => 'myemail'
                        from => 'elastic@localhost'
                        subject => "test"
                        body => "Test %{message}"
                        address => 'exchangeservername'
                        domain => 'somedomain.local'
                        port => 25
                        via => "smtp"
                        }
```

---

<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:** [October 3, 2019, 1:26am UTC](https://discuss.elastic.co/t/logstash-output-email-test/198133/2 "2019-10-03T01:26:07Z")

</div>

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