Java Web 应用程序的最佳邮件库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1574116/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Best mail library for Java web applications
提问by cedric
I am investigating on the best free mail library to use for Java web applications. It is something with more support and easy to use. If it's complex but would be justified by its great features it might do.
我正在研究用于 Java Web 应用程序的最佳免费邮件库。它具有更多支持且易于使用。如果它很复杂但可以通过其强大的功能来证明它可能会这样做。
Have any suggestions?
有什么建议吗?
采纳答案by ChssPly76
"Best" is subjective, especially since you didn't specify any particular features you may be looking for.
“最佳”是主观的,特别是因为您没有指定您可能正在寻找的任何特定功能。
With that said, here's a couple to get you started:
话虽如此,这里有一些可以帮助您入门:
- Simple Java Mail- built on top of JavaMail, simplifies API to produce a correct emails
- Commons Email- built on top of JavaMail, simplifies certain commonly used scenarios.
- Spring Email integration(only if you're using Spring already)
- Simple Java Mail- 建立在 JavaMail 之上,简化 API 以生成正确的电子邮件
- Commons Email- 建立在 JavaMail 之上,简化了某些常用场景。
- Spring 电子邮件集成(仅当您已经在使用 Spring 时)
javaee.github curates a comprehensive list with many more:
javaee.github 整理了一个包含更多内容的综合列表:
Oracle has a curated list as well, although the lists are suspiciously similar:
Oracle 也有一个精选的列表,尽管这些列表非常相似:
回答by Jim Garrison
Does the Sun Javamail API not work for you?
Sun Javamail API 对您不起作用吗?
回答by Yishai
JavaMail is the standard, but it is only a client, so you need to have a separate e-mail service to send mail. Asprinis a good implementation of a server.
JavaMail 是标准的,但它只是一个客户端,所以你需要有一个单独的电子邮件服务来发送邮件。Asprin是一个很好的服务器实现。
EDIT: Asprin is a send only e-mail server. You can't use it as a full fledged POP or IMAP server. It just sends e-mail without any further third party (such as an ISP's mail service) dependencies (other than an internet connection). Unlike JavaMail, which requires you to have an SMTP server available to send e-mail for you (like from your ISP). If you need a full e-mail server, that can provide pop and imap e-mail, take a look at James.
编辑: Asprin 是只发送电子邮件服务器。您不能将其用作成熟的 POP 或 IMAP 服务器。它只是发送电子邮件,没有任何其他第三方(例如 ISP 的邮件服务)依赖项(互联网连接除外)。与 JavaMail 不同,JavaMail 要求您有一个 SMTP 服务器来为您发送电子邮件(例如来自您的 ISP)。如果您需要一个完整的电子邮件服务器,可以提供 pop 和 imap 电子邮件,请查看James。
Hereis a list of java mail options, although most, like JavaMail, are clients, not stand alone solutions.
这是一个 Java 邮件选项列表,尽管大多数(如 JavaMail)都是客户端,而不是独立的解决方案。
回答by Basil Musa
Simple Java Mailwhich is a wrapper around Java Mail api:
简单的 Java Mail,它是 Java Mail api 的包装器:
https://github.com/bbottema/simple-java-mail(Maven Repository)