# Email plugin (LS 2.1.1 windows) for Gmail

**URL:** <https://discuss.elastic.co/t/email-plugin-ls-2-1-1-windows-for-gmail/38972>\
**Category:** Logstash\
**Created:** [January 12, 2016, 11:55am UTC](https://discuss.elastic.co/t/email-plugin-ls-2-1-1-windows-for-gmail/38972 "2016-01-12T11:55:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![john22122015](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@john22122015](https://discuss.elastic.co/u/john22122015)\
**Post date:** [January 12, 2016, 11:55am UTC](https://discuss.elastic.co/t/email-plugin-ls-2-1-1-windows-for-gmail/38972/1 "2016-01-12T11:55:57Z")

</div>

Hi colleagues!

I have an issue with LS 2.1.1 windows, in email plugin for gmail configuration. Thus, the email is not sent. Despite of the email is not sent, the indices are created normally.  
When I iniciate logstash, the output of Power Shell sends the error below:

C:\logstash-2.1.1\bin\>logstash -f logstashTMC.conf  
io/console not supported; tty will not be manipulated  
Settings: Default filter workers: 1  
Logstash startup completed

**C:/logstash-2.1.1/vendor/bundle/jruby/1.9/gems/mail-2.6.3/lib/mail/network/delivery\_methods/sendmail.rb:72 warning: unsupported popen option: err**

The logstash.conf configuration is below:

```
output {
	elasticsearch { 
		hosts => ["localhost:9200"] 
		index => 'systemout_tmc'
	}	
	email {
		address => "smtp.gmail.com"
		port => 587
		use_tls => true
		authentication => "plain"
		from => "xxx@gmail.com"
		username => "xxx@gmail.com"
		password => "xxx"
		subject => "TEST"
		to => "xxx@gmail.com"
		via => "sendmail"
		body => "TEST"
	}
}

```

Any ideia folks?

Thanks for help.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 12, 2016, 12:03pm UTC](https://discuss.elastic.co/t/email-plugin-ls-2-1-1-windows-for-gmail/38972/2 "2016-01-12T12:03:22Z")

</div>

The error message is weird, but unless you have installed a sendmail-compatible program on your Windows box you'll want to keep `via` at its default value ("smtp").

---

<div class="post-metadata">

**Author:** ![john22122015](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@john22122015](https://discuss.elastic.co/u/john22122015)\
**Post date:** [January 12, 2016, 12:30pm UTC](https://discuss.elastic.co/t/email-plugin-ls-2-1-1-windows-for-gmail/38972/3 "2016-01-12T12:30:17Z")

</div>

Hi Magnus.

I have not installed a sendmail-compatible, so I have changed `via => "sendmail"` to `via => "smtp"`.  
But it has returned a permission error:

C:\logstash-2.1.1\bin\>logstash -f logstashTMC.conf  
io/console not supported; tty will not be manipulated  
Settings: Default filter workers: 1  
Logstash startup completed

**←[31mSomething happen while delivering an email {:exception=\>#\< SocketError: Permission denied: no further information\>, :level=\>:error}←[0m**

Notice that the [xxx@gmail.com](mailto:xxx@gmail.com) account, which sends the email, has habilitated the smtp service.

What this error permission would be?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 12, 2016, 12:36pm UTC](https://discuss.elastic.co/t/email-plugin-ls-2-1-1-windows-for-gmail/38972/4 "2016-01-12T12:36:13Z")

</div>

Are outgoing connections blocked in the Windows firewall? If not I don't know what's going on.

---

<div class="post-metadata">

**Author:** ![john22122015](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@john22122015](https://discuss.elastic.co/u/john22122015)\
**Post date:** [January 12, 2016, 12:55pm UTC](https://discuss.elastic.co/t/email-plugin-ls-2-1-1-windows-for-gmail/38972/5 "2016-01-12T12:55:25Z")

</div>

The email plugin needs to have the firewall desabilitted to send emails?  
I have searched about Elastalert, it does the samething that email plugin of LS does?

Thanks!

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 12, 2016, 5:55pm UTC](https://discuss.elastic.co/t/email-plugin-ls-2-1-1-windows-for-gmail/38972/6 "2016-01-12T17:55:30Z")

</div>

> The email plugin needs to have the firewall desabilitted to send emails?

You don't have to disable the firewall completely, but you obviously need to be able to connect to [smtp.gmail.com:587](http://smtp.gmail.com:587). Perhaps there's a proxy in the way? Is there another SMTP server in your network that you can connect to instead?

> I have searched about Elastalert, it does the samething that email plugin of LS does?

I have never heard of Elastalert.

---

<div class="post-metadata">

**Author:** ![john22122015](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@john22122015](https://discuss.elastic.co/u/john22122015)\
**Post date:** [January 13, 2016, 10:44am UTC](https://discuss.elastic.co/t/email-plugin-ls-2-1-1-windows-for-gmail/38972/7 "2016-01-13T10:44:37Z")

</div>

Hi Magnus!

The situation was due the firewall blocking. I allowed the SMTP 587 port and it worked.

Thanks a lot!

---

<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:** [July 6, 2017, 5:15am UTC](https://discuss.elastic.co/t/email-plugin-ls-2-1-1-windows-for-gmail/38972/8 "2017-07-06T05:15:53Z")

</div>

Closed on July 6, 2017, 5:15am UTC


