title: receiving and handling emails in java
body: <p>I am working on application that reads input from email and do action according to it.
  My application should listen for any new emails and parse it to get attachment file and data inside the body.</p>
  
  <p>My question is: How can I do that in java? how to do that listener in java?
  I have an email that I will use to parse received from, but what I want how to listen to any new email and parse data from it.</p>