# Email attachements

**URL:** <https://discuss.elastic.co/t/email-attachements/131917>\
**Category:** Logstash\
**Created:** [May 15, 2018, 11:05am UTC](https://discuss.elastic.co/t/email-attachements/131917 "2018-05-15T11:05:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rouchad\_rouchad](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@rouchad\_rouchad](https://discuss.elastic.co/u/rouchad_rouchad)\
**Post date:** [May 15, 2018, 11:05am UTC](https://discuss.elastic.co/t/email-attachements/131917/1 "2018-05-15T11:05:24Z")

</div>

i use elasticSearch 6.2 i want transfer my database(emails) from my gmail to elasticsearch  
the probleme is that elastcisearch can't read the emails which contains attachements like PDF , XML files  
i found that i need install : ingest plugin attachement  
i have installed it  
and when i start logstash i got this error :  
[2018-05-15T12:31:25,411][ERROR][logstash.pipeline] A plugin had an unrecoverable error. Will restart this plugin.  
Pipeline\_id:main  
Plugin: \<LogStash::Inputs::IMAP host=\>"[imap.gmail.com](http://imap.gmail.com)", password=\>, user=\>"rouchad767@gmail.com", port=\>993, secure=\>true, fetch\_count=\>15, check\_interval=\>10, folder=\>"Inbox", id=\>"5b54a6cc24ec8207c02a599c52899e0822d819c18ab6fea278f09e1ea2a56e8b", enable\_metric=\>true, codec=\>\<LogStash::Codecs::Plain id=\>"plain\_7ddc0b5d-4cbd-4467-9945-c7e6005478ac", enable\_metric=\>true, charset=\>"UTF-8"\>, verify\_cert=\>true, lowercase\_headers=\>true, delete=\>false, expunge=\>false, strip\_attachments=\>false, content\_type=\>"text/plain"\>  
Error: Can not decode an entire message, try calling #decoded on the various fields and body or parts if it is a multipart message.  
Exception: NoMethodError  
Stack: C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/mail-2.6.6/lib/mail/message.rb:1903:in `decoded' C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:119:in`parse\_mail'  
C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:88:in `block in check_mail' org/jruby/RubyArray.java:1734:in`each'  
C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:82:in `block in check_mail' org/jruby/RubyArray.java:1778:in`each\_slice'  
C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:80:in `check_mail' C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:69:in`block in run'  
C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/interval.rb:20:in `interval' C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:68:in`run'  
C:/elk/logstash/logstash-core/lib/logstash/pipeline.rb:516:in `inputworker' C:/elk/logstash/logstash-core/lib/logstash/pipeline.rb:509:in`block in start\_input'

please i need your help  
thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 15, 2018, 11:45am UTC](https://discuss.elastic.co/t/email-attachements/131917/2 "2018-05-15T11:45:57Z")

</div>

As the error is a Logstash one I moved your question to #logstash forum.

---

<div class="post-metadata">

**Author:** ![rouchad\_rouchad](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@rouchad\_rouchad](https://discuss.elastic.co/u/rouchad_rouchad)\
**Post date:** [May 15, 2018, 2:45pm UTC](https://discuss.elastic.co/t/email-attachements/131917/3 "2018-05-15T14:45:16Z")

</div>

thank you Dadoonet

---

<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:** [June 12, 2018, 2:48pm UTC](https://discuss.elastic.co/t/email-attachements/131917/4 "2018-06-12T14:48:16Z")

</div>

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