电子邮件客户端库 [英] EMail Client Library

查看:116
本文介绍了电子邮件客户端库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种在接收方包装Javamail API的库,其方式与 Commons电子邮件处理电子邮件的发送.

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. 订阅邮件服务器
  2. 当电子邮件到达时通知我
  3. 为我处理附件(为什么我应该关心base64编码?)
  4. 断开与邮件服务器的连接

任何人都知道上述的邮件库/API吗?

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

推荐答案

您可以查看 Jodd 电子邮件:接收电子邮件").除了发送电子邮件外,它还包装了用于接收电子邮件的javamail API.因此,您可以这样做:

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. 连接到pop3(计划和SSL)邮件服务器
  2. 手动接收电子邮件
  3. 使用简单的API处理所有收到的电子邮件;包括多封邮件,附件,contentIds等.
  4. 断开与邮件服务器的连接

如您所见,您必须手动 接收电子邮件,因此它不会即刻通知您的代码(您的第二点).这是有目的的,因为有很多方法可以通知您的代码以及如何监视收到的电子邮件.其中的大多数实际上很容易实现,或者取决于其余的应用程序体系结构/使用的库.

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.

这篇关于电子邮件客户端库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆