EMail Client Library [closed]

只愿长相守 提交于 2019-12-21 07:30:13

问题


I'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:

  1. Subscribe to a mail server
  2. Notify me when an email arrives
  3. Handle attachments for me (why should I care about base64 encoding?)
  4. Disconnect from the mail server

Anybody know of a mail library/API that does the above?


回答1:


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:

  1. Connect to a pop3 (plan and ssl) mail server
  2. Receive emails manually
  3. Process all received emails using simple API; including multiple messages, attachments, contentIds etc.
  4. 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.



来源:https://stackoverflow.com/questions/7666373/email-client-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!