We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
开发者_运维问答 Improve this questionI'm looking for a library that wraps the javamail API on the receiving side, in the same manner that Commons Email handles the sending of emails.
In my perfect world the library works in the following manner:
- Subscribe to a mail server
- Notify me when an email arrives
- Handle attachments for me (why should I care about base64 encoding?)
- Disconnect from the mail server
Anybody know of a mail library/API that does the above?
You may look at Jodd Email: https://jodd.org/email/ (see: 'Receiving emails'). Besides for sending emails, it also wraps javamail API for receiving emails. So you can do:
- Connect to a pop3 (plan and ssl) mail server
- Receive emails manually
- Process all received emails using simple API; including multiple messages, attachments, contentIds etc.
- Disconnect from mail server
As you see, you have to receive emails manually, so it will not notify your code out-of-box (your point #2). This is done on purpose, as there are many ways how your code can be notified and how received email can be monitored. Most of this is really easy to implement or depends on the rest of your application architecture/used libraries.
精彩评论