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.
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.
- Features
- Configuration and Spring support
- Security
- Logging and debugging
- Modules
- CLI
- 9.0 migration notes
Simple Java Mail is available in Maven Central:
<dependency>
<groupId>org.simplejavamail</groupId>
<artifactId>simple-java-mail</artifactId>
<version>9.0.0</version>
</dependency>Read about additional modules you can add here: simplejavamail.org/modules.
- Project mechanisms catalogue for optional module loading, CLI metadata generation, MIME selection, proxy bridging, concurrency, and non-null instrumentation.
- API expansion workflow for adding public API fields or builder methods.
- Developer environment setup for JDK and build constraints.
Unreleased 9.0.0
- #297: Added per-recipient S/MIME certificates, enabling encrypted mail for multiple recipients with different certificates.
- #613: Added a dedicated recipient builder API for constructing single recipients and recipient collections.
- #614: Added explicit Outlook conversion result APIs for inspecting source
.msgheaders and metadata without copying structural headers into converted emails, resolving #609. - #574: Added Delivery Status Notification (DSN) configuration.
- #605: Added per-body
Content-Transfer-Encodingconfiguration for plain text, HTML, and calendar content. - #573: Added pre-encoded attachment and embedded-image APIs.
- #566, #597, #602, #607: Improved MIME resource
Content-IDhandling for explicit IDs, parsed embedded images, and generated fallback IDs. - #589: Added Jakarta Mail debug output configuration.
- #568: Added local bind address configuration for multi-IP SMTP hosts.
- #196: Added mailer-level default DKIM signing configuration so DKIM can be configured once per
Mailer. - #569: Added simple sequential batch sending and callback-scoped open connection sending without the batch module.
- #565: Fixed batch-module cluster configuration so different cluster keys can keep separate connection-pool defaults through the Java API.
- #618: Added property-defined batch cluster configurations for property-file and Spring-configured clustered sending, complementing the Java API cluster configuration from #565.
- #615: Fixed
MailerGenericBuilder.async()so no-argtestConnection()uses the configured async default. - #611: Fixed custom SSL socket factory configuration for SMTPS mailers.
- #535: Let async send and connection-test failures surface through the returned
CompletableFuturewithout duplicate framework error logs. - #572: Tolerate unsupported S/MIME payloads during Outlook conversion instead of failing conversion.
- #571: Preserve parsed email content when S/MIME signature verification fails and expose the invalid signature status.
- #606: Sanitize malformed resource MIME types before generating attachment and embedded-image headers.
- #541: Removed the non-standard
filenameparameter from resourceContent-Typeheaders; filenames remain available throughContent-Disposition. - #265: Added Java 9 module descriptors to the core and facade jars so modular applications can require
org.simplejavamaildirectly, completing the multi-release jar support requested in #237. - #583: Fixed CLI startup on Java 25.
- #616: Removed the runtime JetBrains annotation fork from CLI optional-argument detection.
- Fixed standalone CLI command cleanup so
send,connect, andvalidatewait for command work and close mailer resources, preventing batch-module resources from keeping the process alive. - 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), 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).
utils-mail-dkim3.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-pool4.0.1 (#6): added cluster-specific Java configuration for pool defaults, claim timeout, and load balancing.smtp-connection-pool3.0.1 (#8): pulled inclustered-object-pool4.0.1 so the batch-module fix for #565 can keep connection-pool defaults per cluster key.smtp-connection-pool3.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-server4.2.0: updated SOCKS live tests to use dynamic proxy ports instead of fixed ports.outlook-message-parser1.15.0: improved Outlook.msgconversion 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), and updating Apache POI.- Logging dependencies: aligned Log4j to 2.25.4 (#624) and SLF4J API to 2.0.18 (#631), keeping the Log4j bridge on
log4j-slf4j2-implfor SLF4J 2.x.
- Build and test maintenance: 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 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), 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); and replaced live embedded-image URL tests with deterministic local coverage (#617).
v8.12.0 - v8.12.6
- v8.12.6 (18-April-2025): #595: [bug] Spring configuration - fix support for simplejavamail.extraproperties
- v8.12.5 (05-March-2025): Bumped PATCH versions of various dependencies #553, #554, #555, #562, #567
- v8.12.4 (12-December-2024): #558: [bug] Mailer.close() exception because it attempts to shutdown batch-module connection pools, even if not available on the classpath
- v8.12.3 (25-November-2024): #563: [enhancement] Add getter for Authenticated SOCKS server port
- v8.12.2 (05-October-2024): #552: [bug] support iCalendar events with METHOD defined in body instead of Content-Type
- v8.12.1 (02-October-2024): #533: [maintenance] Bump com.github.therapi:therapi-runtime-javadoc-scribe from 0.13.0 to 0.15.0
- v8.12.1 (02-October-2024): #532: [maintenance] Bump com.sanctionco.jmail:jmail from 1.4.1 to 1.6.3
- v8.12.1 (02-October-2024): #531: [maintenance] Bump com.github.bbottema:java-socks-proxy-server from 4.0.0 to 4.1.2
- v8.12.1 (02-October-2024): #528: [maintenance] Buump com.github.davidmoten:subethasmtp from 7.0.1 to 7.1.1
- v8.12.1 (02-October-2024): #522: [maintenance] Bump jakarta.annotation:jakarta.annotation-api from 1.3.5 to 3.0.0
- v8.12.0 (26-September-2024): #550: [bug] Environment variables are not being loaded properly
- v8.12.0 (26-September-2024): #538: [bug] System properties are only read if configuration file exists in class path
- v8.12.0 (26-September-2024): #546: [Enhancement] Trim whitespace in encoder values for Content-Encoding
Older release notes are maintained in RELEASE_HISTORY.md.