Volver al ranking

bbottema/simple-java-mail

Javasimplejavamail.org

Simple API, Complex Emails (Jakarta Mail smtp wrapper)

javajava-mailoutlookbatch-processingsmimedkimdmarchigh-performancespring-supportconversioncli-supportbuilder-api
Crecimiento de estrellas
Estrellas
1.3k
Forks
272
Crecimiento semanal
Issues
1
5001k
abr 2015ene 2019oct 2022jul 2026
ArtefactosMavengit clone https://github.com/bbottema/simple-java-mail.git
README

APACHE v2 License Latest Release Javadocs Codacy Java 8+

Simple Java Mail

Simple Java Mail is a robust Java mailing library built to make production email simple to use: rich content, recipient governance, signing and encryption, transport security, configuration, diagnostics, conversion, and high-throughput batch or clustered sending.

It keeps those concerns behind a consistent high-level API, while still giving you fluent builders, property/Spring configuration, defaults and overrides, validation, logging, and lower-level Jakarta Mail escape hatches when you need them.

Under the hood, Simple Java Mail sits on top of Angus Mail (previously Jakarta Mail).

Simple Java Mail remains Java 8-compatible; Java 8 is the source, target, and minimum supported runtime.

Documentation

The full user documentation lives at simplejavamail.org. Start there for the minimal banner example, grand examples, feature guides, configuration reference, diagnostics, and module overview.

Installation

Simple Java Mail is available in Maven Central:

<dependency>
    <groupId>org.simplejavamail</groupId>
    <artifactId>simple-java-mail</artifactId>
    <version>9.1.0</version>
</dependency>

Read about additional modules you can add here: simplejavamail.org/modules.

Development

Latest progress

v9.1.0 - Maven Central

  • #653: a configurable SMTP client hostname for the EHLO / HELO command.
  • #654: SMTP submission receipts for reading the server acceptance response after a send.
  • No breaking changes; existing sendMail(...) behavior is unchanged.

v9.0.0 - v9.0.4 - Maven Central

The Short Version

Simple Java Mail has been going strong-ish for about 20 years, and 9.0.0 rolls roughly two years of backlog into a new major release.

simple-java-mail
└── outlook-message-parser
    └── rtf-to-html
└── java-utils-mail-dkim
└── java-utils-mail-smime
└── smtp-connection-pool
    └── clustered-object-pool
        └── generic-object-pool
└── java-socks-proxy-server

Across Simple Java Mail and the supporting libraries that keep the stack moving, more than 100 GitHub issues and PRs were reviewed, fixed, merged, or closed while keeping the project Java 8-compatible.

Major features: the dedicated recipient builder API, per-recipient S/MIME certificates, first-class Delivery Status Notification support, pre-encoded attachment and embedded-image sending, mailer-level DKIM defaults, and simple batch/open-connection sending without the batch module. Enhancements: broader Outlook conversion metadata, MIME resource handling, content-transfer encoding control, debug routing, local SMTP bind configuration, batch cluster configuration, and Java module support.

Migration Note

This is a breaking major release. The old recipient-addition method jungle has been cleaned up in favor of the recipient builder API, so code that relied on the removed recipient overloads needs to migrate. Start with the 9.0 migration notes before upgrading.

Major Features

  • #613: Recipient builder API: added dedicated builders for constructing single recipients and recipient collections.
  • #297: Per-recipient S/MIME certificates: enabled encrypted mail for multiple recipients with different certificates.
  • #574: Delivery Status Notification (DSN): added first-class DSN configuration.
  • #573: Pre-encoded resources: added pre-encoded attachment and embedded-image APIs.
  • #196: Mailer-level DKIM defaults: added default DKIM signing configuration so DKIM can be configured once per Mailer.
  • #569: Simple batch and open-connection sending: added sendMailsInSimpleBatch(...) for sequential batch work without the batch module and withOpenConnection(...) for callback-scoped reuse of a single SMTP connection.

Enhancements

  • #614: Outlook conversion metadata: added explicit result APIs for inspecting source .msg headers and metadata without copying structural headers into converted emails, resolving #609.
  • #645: Outlook last-modifier metadata: exposed PR_LAST_MODIFIER_NAME / 0x3FFA as OutlookMessageData#getLastModifierName() without treating it as sender identity.
  • #605: Per-body content-transfer encoding: added Content-Transfer-Encoding configuration for plain text, HTML, and calendar content.
  • #566, #597, #602, #607: MIME resource Content-ID handling: improved explicit IDs, parsed embedded images, and generated fallback IDs.
  • #589: Jakarta Mail debug output: added configurable debug output routing.
  • #568: Local SMTP bind address: added configuration for multi-IP SMTP hosts.
  • #565, #618: Batch cluster configuration: fixed Java API cluster configuration and added property-defined cluster configurations for property-file and Spring-configured clustered sending.
  • #572, #571: S/MIME conversion leniency: tolerate unsupported S/MIME payloads during Outlook conversion and preserve parsed email content when signature verification fails.
  • #606: MIME type sanitizing: sanitize malformed resource MIME types before generating attachment and embedded-image headers.
  • #541: Resource headers: removed the non-standard filename parameter from resource Content-Type headers; filenames remain available through Content-Disposition.
  • #265, #237: Java module support: added Java 9 module descriptors to the core and facade jars so modular applications can require org.simplejavamail directly.

Fixes and Compatibility

  • #615: Async test connections: fixed MailerGenericBuilder.async() so no-arg testConnection() uses the configured async default.
  • #611: SMTPS custom SSL socket factories: fixed custom SSL socket factory configuration for SMTPS mailers.
  • #535: Async failure reporting: let async send and connection-test failures surface through the returned CompletableFuture without duplicate framework error logs.
  • #583: Java 25 CLI startup: fixed CLI startup on Java 25.
  • #616: CLI optional-argument detection: removed the runtime JetBrains annotation fork from CLI optional-argument detection.
  • #652: RFC 2047 address validation: reject encoded-word syntax inside address specs during validation while keeping encoded display names valid.
  • Standalone CLI command cleanup: send, connect, and validate now wait for command work and close mailer resources, preventing batch-module resources from keeping the process alive.

Dependency and Supporting-Library Updates

  • Core dependency maintenance: bumped JMail to 2.1.0 (#634), commons-io to 2.22.0 (#579, #627), Kryo to 5.6.2 (#586), Zip4j to 2.11.5 (#587), SubEthaSMTP to 7.2.2 (#593, #632), Angus Mail to 2.0.4 (#604), Jakarta Mail API to 2.1.5 with Jakarta Activation / Angus Activation alignment, Objenesis to 3.5 (#580, #635), Lombok to 1.18.46 (#636), AssertJ Core to 3.27.7 (#622), and SpotBugs annotations to 4.10.2 (#629).
  • Logging dependencies: aligned Log4j to 2.25.4 (#624) and SLF4J API to 2.0.18 (#631), keeping the Log4j bridge on log4j-slf4j2-impl for SLF4J 2.x.
Supporting Libraries
  • utils-mail-dkim 3.3.0: added configurable DNS provider URL support for DKIM domain-key TXT lookups, fixed the published automatic module name, and kept packaged artifacts free of JaCoCo probes.
  • clustered-object-pool 4.0.1 (#6): added cluster-specific Java configuration for pool defaults, claim timeout, and load balancing.
  • smtp-connection-pool 3.0.1 (#8): pulled in clustered-object-pool 4.0.1 so the batch-module fix for #565 can keep connection-pool defaults per cluster key.
  • smtp-connection-pool 3.0.0: made clustered SMTP pools generic over their cluster-key type and kept already-unusable connections from surfacing as generic pool error logs during transport close.
  • java-socks-proxy-server 4.2.0: updated SOCKS live tests to use dynamic proxy ports instead of fixed ports.
  • outlook-message-parser 1.16.1: improved Outlook .msg conversion by preserving nested message attachment metadata, fixing sent-date extraction (#534), fixing recipient bucket parsing (#504), broadening S/MIME detection, improving RTF-only body conversion (#576), avoiding browser-default <pre> styling for Outlook plain-text RTF conversion (#651), updating Apache POI, and exposing Outlook last-modifier source metadata.
Build and Test Maintenance
  • Build plugins and test stack: bumped Maven Surefire Plugin to 3.5.6 (#592, #625), Maven Clean Plugin to 3.5.0 (#626), Appassembler Maven Plugin to 2.1.0 (#581), Exec Maven Plugin to 3.5.0 (#582), Maven Assembly Plugin to 3.8.0, Maven Deploy Plugin to 3.1.4 (#619), Maven Install Plugin to 3.1.4 (#639), Maven Javadoc Plugin to 3.12.0 (#637), Maven GPG Plugin to 3.2.8 (#621), Nexus Staging Maven Plugin to 1.7.0, and JaCoCo Maven Plugin to 0.8.15 (#638); aligned JUnit Platform/Jupiter at 1.14.4/5.14.4 while preserving Java 8 compatibility (#596, #633); kept JUnit Pioneer on 1.9.1 because 2.x is Java 11 bytecode (#630); added Dependabot ignore rules for Java 11-only upgrade lines; restored release packaging for generated source-license headers and standalone CLI ZIP/TAR classifier artifacts; and replaced live embedded-image URL tests with deterministic local coverage (#617).

The full stand-alone release history is maintained in RELEASE_HISTORY.md.

Repositorios relacionados
CyC2018/CS-Notes

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

algorithmleetcode
cyc2018.xyz
184.8k50.8k
Snailclimb/JavaGuide

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

JavaScriptnpmApache License 2.0javainterview
javaguide.cn
157.2k46.2k
iluwatar/java-design-patterns

Design patterns implemented in Java

JavaMavenOtherjavaprinciples
java-design-patterns.com
94.2k27.4k
Stirling-Tools/Stirling-PDF

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

JavaMavenOtherdockerjava
stirling.com
87.7k7.8k
macrozheng/mall

mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于Spring Boot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。

JavaMavenApache License 2.0spring-bootspring-security
macrozheng.com/admin/
84.3k29.8k
spring-projects/spring-boot

Spring Boot helps you to create Spring-powered, production-grade applications and services with absolute minimum fuss.

JavaMavenApache License 2.0javaspring-boot
spring.io/projects/spring-boot
81.1k42k
doocs/advanced-java

😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识

JavaMavenCreative Commons Attribution Share Alike 4.0 Internationaljavadistributed-systems
java.doocs.org
79k19.2k
elastic/elasticsearch

Free and Open Source, Distributed, RESTful Search Engine

JavaMavenOtherelasticsearchjava
elastic.co/products/elasticsearch
77.6k26.1k
TheAlgorithms/Java

All Algorithms implemented in Java

JavaMavenMIT Licensejavaalgorithms
66k21.2k
kdn251/interviews

Everything you need to know to get the job.

JavaMavenMIT Licensejavainterview
youtube.com/channel/UCKvwPt6BifPP54yzH99ff1g
65.1k12.9k
youngyangyang04/leetcode-master

《代码随想录》LeetCode 刷题攻略:200道经典题目刷题顺序,共60w字的详细图解,视频难点剖析,50余张思维导图,支持C++,Java,Python,Go,JavaScript等多语言版本,从此算法学习不再迷茫!🔥🔥 来看看,你会发现相见恨晚!🚀

Shellleetcodeprogrammer
62k12.3k
azl397985856/leetcode

LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)

JavaScriptnpmOtheralgorithmleetcode
leetcode-solution-leetcode-pp.gitbook.io/leetcode-solution/
55.8k9.4k