# Smtp authentication error

**URL:** <https://discuss.elastic.co/t/smtp-authentication-error/79647>\
**Category:** Logstash\
**Created:** [March 22, 2017, 8:34pm UTC](https://discuss.elastic.co/t/smtp-authentication-error/79647 "2017-03-22T20:34:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![August\_rush](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@August\_rush](https://discuss.elastic.co/u/August_rush)\
**Post date:** [March 22, 2017, 8:34pm UTC](https://discuss.elastic.co/t/smtp-authentication-error/79647/1 "2017-03-22T20:34:00Z")

</div>

I am trying to send emails

email {  
port =\> 587  
address =\> "[smtp.gmail.com](http://smtp.gmail.com)"  
username =\> "**@gmail.com"  
password =\> "**_"  
authentication =\> "plain"  
use\_tls =\> true  
from =\> "__@gmail.com"  
subject =\> "logstash alert"  
to =\> "_\*@gmail.com"  
via =\> "smtp"  
body =\> "here is the event line that occured"  
debug =\> true  
}

{:timestamp=\>"2017-03-22T16:27:28.409000-0400", :message=\>"Something happen while delivering an email", :exception=\>#\<Net::SMTPAuthenticationError: 454 4.7.0 Too many login attempts, please try again later. b126sm1719947qka.26 - gsmtp

> , :level=\>:error}

---

<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:** [March 23, 2017, 6:05am UTC](https://discuss.elastic.co/t/smtp-authentication-error/79647/2 "2017-03-23T06:05:18Z")

</div>

As the error message indicates Gmail thinks you have provided bad credentials too many times so your account has been blacklisted for a while.

---

<div class="post-metadata">

**Author:** ![August\_rush](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@August\_rush](https://discuss.elastic.co/u/August_rush)\
**Post date:** [March 23, 2017, 2:19pm UTC](https://discuss.elastic.co/t/smtp-authentication-error/79647/3 "2017-03-23T14:19:16Z")

</div>

I have changed my password , restarted logstash and now i am getting this error, not sure what could be this issue be? any suggestions would be helpful.  
{:timestamp=\>"2017-03-23T10:17:47.235000-0400", :message=\>"Something happen while delivering an email", :exception=\>#\<EOFError: End of file reached\>, :level=\>:error}

---

<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:** [March 23, 2017, 2:20pm UTC](https://discuss.elastic.co/t/smtp-authentication-error/79647/4 "2017-03-23T14:20:24Z")

</div>

Please format log snippets as preformatted text. I want to know what comes after ":exception=\>#".

---

<div class="post-metadata">

**Author:** ![August\_rush](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@August\_rush](https://discuss.elastic.co/u/August_rush)\
**Post date:** [March 23, 2017, 2:32pm UTC](https://discuss.elastic.co/t/smtp-authentication-error/79647/5 "2017-03-23T14:32:11Z")

</div>

I am using vi editor and so i am not sure on how i should change the log snippets as preformatted text.  
Also here is my configuration  
input {  
file {  
path =\> "/var/log/logstash/logstash.log"  
start\_position =\> beginning  
}  
}  
output {  
file {  
path =\> "/var/log/logstash/iis-%{+YYYY-MM-dd}" }  
email {  
port =\> 587  
address =\> "[smtp.gmail.com](http://smtp.gmail.com)"  
username =\> "###@gmail.com"  
password =\> "@@@@"  
authentication =\> "plain"  
use\_tls =\> true  
from =\> "###@gmail.com"  
subject =\> "logstash alert"  
to =\> "###@gmail.com"  
via =\> "smtp"  
body =\> "here is the event line that occured"  
debug =\> true  
}  
}

---

<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:** [March 23, 2017, 2:53pm UTC](https://discuss.elastic.co/t/smtp-authentication-error/79647/6 "2017-03-23T14:53:08Z")

</div>

This has nothing to do with your use of vim. Use the `</>` toolbar button in the [discuss.elastic.co](http://discuss.elastic.co) interface above the text box where you, presumably, are writing your posts. If you prefer using Markdown directly that's fine too.

Again, I want to know what comes after ":exception=\>#".

---

<div class="post-metadata">

**Author:** ![August\_rush](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@August\_rush](https://discuss.elastic.co/u/August_rush)\
**Post date:** [March 23, 2017, 6:05pm UTC](https://discuss.elastic.co/t/smtp-authentication-error/79647/8 "2017-03-23T18:05:47Z")

</div>

```
    {:timestamp=>"2017-03-23T14:00:03.784000-0400", :message=>"Something happen while delivering an email", :exception=>#<EOFError: End of file reached>, :level=>:error}
```

---

<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:** [April 20, 2017, 6:05pm UTC](https://discuss.elastic.co/t/smtp-authentication-error/79647/9 "2017-04-20T18:05:54Z")

</div>

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