What’s the easiest way to read emails from IMAP account in Java? Depends what your background is. If you have any experience in Apache Camel, ServiceMix, Mule, you already know the answer. If you don’t, and your application is using Spring already, Spring-Integration may be the solution for you.
It’s not a one-liner like what you could do with Camel, but it’s still quite easy to understand.
Spring Integration has great docs and there are nice tutorials around, but if you just want to get it running first and dig into the docs later, here is a quick example for you.
To make it work, you need three steps: