简体   繁体   English

用于发送电子邮件的Java框架

[英]Java framework for sending emails

Do you know any framework in Java for reliably sending a huge amount of emails with the following features: 您是否知道Java中用于可靠地发送大量具有以下功能的电子邮件的任何框架:

  • Send and receive emails 发送和接收电子邮件
  • Concurrently process emails from a queue to maximize the throughput 同时处理来自队列的电子邮件以最大化吞吐量
  • Keep track of emails that could not be delivered 跟踪无法发送的电子邮件

I know that writing my own is not very hard, but I was wondering whether there is already something sophisticated that I can reuse. 我知道自己编写并不是很困难,但是我想知道是否已经有一些我可以重用的东西。

UPDATE : The use case for my question is not sending newsletters or spam. 更新 :我的问题的用例不是发送新闻通讯或垃圾邮件。 It's emergency mass notification, eg sending 50,000 emails within 5 minutes. 这是紧急大量通知,例如在5分钟内发送50,000封电子邮件。 I also do not want to implement my own mail server, I want to use existing mail server(s) with the JavaMail API. 我也不想实现自己的邮件服务器,我想将现有的邮件服务器与JavaMail API一起使用。 But the JavaMail API doesn't provide any facilities for queing and concurrently sending emails and keeping track of emails that could not be sent. 但是JavaMail API没有提供任何工具来查询和同时发送电子邮件以及跟踪无法发送的电子邮件。

You use the Java Mail API to construct the actual messages you want to send, and let JavaMail use a production quality mail server to do the actual delivery. 您可以使用Java Mail API构造要发送的实际消息,并让JavaMail使用生产质量的邮件服务器来进行实际传递。

An easy configuration to get up and running is postfix under Ubuntu Server. Ubuntu Server下的postfix是一个易于启动和运行的配置。

Please, please, please do not send out unsolicited spam. 拜托,拜托,请不要散发垃圾邮件。

Send and receive emails? 发送和接收电子邮件? Perhaps you are looking for mailing list manager in Java? 也许您正在寻找Java中的邮件列表管理器? Take a look at Subetha which is successfully used in several production sites (and written in Java). 看一下Subetha,它已在多个生产站点中成功使用(并用Java编写)。 http://code.google.com/p/subetha/ http://code.google.com/p/subetha/

They have a sub module, called Subethasmtp, which you can use as a smtp server (in Java). 它们有一个称为Subethasmtp的子模块,您可以将其用作smtp服务器(在Java中)。

您可以使用“ JavaMail”或“ GreenMail”发送和接收电子邮件

Try the Java Mail API . 尝试使用Java Mail API But for really bulk mailing you probably want to talk directly to SMTP. 但是对于真正的批量邮件,您可能想直接与SMTP通讯。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM