# Unable to read email from outlook

**URL:** <https://discuss.elastic.co/t/unable-to-read-email-from-outlook/204187>\
**Category:** Logstash\
**Created:** [October 18, 2019, 8:53am UTC](https://discuss.elastic.co/t/unable-to-read-email-from-outlook/204187 "2019-10-18T08:53:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashokchinna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashokchinna/32/47123_2.png) [@ashokchinna](https://discuss.elastic.co/u/ashokchinna)\
**Post date:** [October 18, 2019, 8:53am UTC](https://discuss.elastic.co/t/unable-to-read-email-from-outlook/204187/1 "2019-10-18T08:53:00Z")

</div>

I am trying to read the emails from the outlook.

```
input {
imap {
 host => "outlook.office365.com"
 password => " ********"
 user => " *********"
 port => 993
 secure => true

 check_interval => 10
 folder => "XYZ"
 }
}
output {
 stdout { codec => rubydebug }
 elasticsearch {
 index => "emails"
 document_type => "email"
 hosts => "localhost:9200"
 }
}

```

[2019-10-18T00:44:39,270][ERROR][logstash.javapipeline] A plugin had an unrecoverable error. Will restart this plugin.  
Pipeline\_id:main  
Plugin: \<LogStash::Inputs::IMAP password=\>, check\_interval=\>10, folder=\>"XYZ", port=\>993, host=\>"[outlook.office365.com](http://outlook.office365.com)", id=\>"", user=\>"\*\*\*\*\*\*\*\*", enable\_metric=\>true, codec=\>\<LogStash::Codecs::Plain id=\>"plain\_", enable\_metric=\>true, charset=\>"UTF-8"\>, secure=\>true, verify\_cert=\>true, fetch\_count=\>50, lowercase\_headers=\>true, delete=\>false, expunge=\>false, strip\_attachments=\>false, content\_type=\>"text/plain"\>  
Error: LOGIN failed.  
Exception: Net::IMAP::NoResponseError  
Stack: uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/imap.rb:1217:in `get_tagged_response' uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/imap.rb:1271:in`block in send\_command'  
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:226:in `mon_synchronize' uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/imap.rb:1253:in`send\_command'  
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/imap.rb:441:in `login' C:/Ashok/logstash-7.1.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:62:in`connect'  
C:/study/logstash-7.1.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:76:in `check_mail' C:/study/logstash-7.1.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:69:in`block in run'  
C:/study/logstash-7.1.1/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/interval.rb:20:in `interval' C:/study/logstash-7.1.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:68:in`run'  
C:/study/logstash-7.1.1/logstash-core/lib/logstash/java\_pipeline.rb:297:in `inputworker' C:/study/logstash-7.1.1/logstash-core/lib/logstash/java_pipeline.rb:290:in`block in start\_input'  
[2019-10-18T00:44:40,258][DEBUG][logstash.config.source.local.configpathloader] Skipping the following files while reading config since they don't match the specified glob pattern

---

<div class="post-metadata">

**Author:** ![Andre\_Letterer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_letterer/32/42248_2.png) [@Andre\_Letterer](https://discuss.elastic.co/u/Andre_Letterer)\
**Post date:** [October 19, 2019, 10:00pm UTC](https://discuss.elastic.co/t/unable-to-read-email-from-outlook/204187/2 "2019-10-19T22:00:26Z")

</div>

Hi,

I have tested your snippet and it just worked.  
So the reason it is not working is this part of your error message:

```auto
Error: LOGIN failed.

```

So could you please check, if you can login with user and password from your logstash snippet under [https://www.outlook.com](https://www.outlook.com) ?

---

<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:** [November 16, 2019, 10:00pm UTC](https://discuss.elastic.co/t/unable-to-read-email-from-outlook/204187/3 "2019-11-16T22:00:28Z")

</div>

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