https://github.com/simple-java-mail/smtp-connection-pool


RELEASE NOTES SMTP Connection Pool


v4.2.0 (17-Sep-2026)

- #33, #34: Add mail.smtppool.pool.expiration-since-creation-millis to the Jakarta provider and Camel configuration. The default 0 keeps age-based expiration disabled; negative values are rejected. Either the last-claim or creation-age threshold makes an available transport eligible for asynchronous retirement. Active leases are not expired, and rapid reuse can delay retirement beyond the threshold.
- #34: Update clustered-object-pool to 4.1.1 and transitively generic-object-pool to 2.5.1, fixing equality between different timeout-policy types with matching thresholds (bbottema/generic-object-pool#24, bbottema/generic-object-pool#25). Use the upstream CombinedExpirationPolicies so both rules and their expiry state remain distinct. Existing APIs, Java baselines and JPMS automatic module names remain supported.


v4.1.0 (08-Sep-2026)

- #31: Add opt-in ClaimOptions/ClaimControl on direct, keyed and load-balanced transport acquisition. One cooperative budget covers registration, selection, waiting and preparation, using clustered-object-pool 4.1.0 and generic-object-pool 2.5.0.
- #31: Add explicitly configured TransportCancellationSupport and secondary lease cancellation. Only the active lease can request physical abort; unsupported providers, including default Angus, expose no abort capability.
- #31: Close partially created transports after failed or cancelled preparation and expose final disposal completion separately, including cleanup failures. Preserve existing claim/lease APIs, caller-owned Sessions, provider selection and Java/module baselines.
- #31: Add a stopped-job demo that cancels waiting acquisition and reuses the healthy SMTP connection. Physical abort support does not imply that a submitted message was unsent.
- #27: Update the optional Camel adapter to Camel 4.22.0, fixing CVE-2026-59230 in MIME multipart unmarshalling with headersInline=true. Retain Java 17 compatibility for the Camel adapter.


v4.0.2 (07-Sep-2026)

- #28: Wake callers already waiting for a pooled SMTP connection when a failed connection is invalidated, through clustered-object-pool 4.0.4 and generic-object-pool 2.4.3. Covers direct, clustered, and Jakarta provider usage without API or Java compatibility changes.


v4.0.1 (11-Aug-2026)

- #11: Declare stable JPMS automatic module names for the core pool, Jakarta Mail provider, and Camel adapter. Verify every packaged manifest and compile an end-to-end module-path consumer over generic-object-pool 2.4.2 and clustered-object-pool 4.0.3.


v4.0.0 (10-Aug-2026)

- #10: Add an explicit SMTP transport lease, an optional Jakarta Mail smtppool provider, and a separate Camel selection adapter without changing the existing `org.simplejavamail:smtp-connection-pool` dependency or direct API. Include a build-tested but non-published demo project for direct, Simple Java Mail, Jakarta Mail, Spring, and Camel usage; defer the standalone batch-module example until Simple Java Mail 9.3.0 exposes its supported public API. Harden credential-generation retirement and graceful-to-forced shutdown with generic-object-pool 2.4.1 and clustered-object-pool 4.0.2.


v3.1.0 (07-Aug-2026)

- #9: Resolve a current OAuth2 access token whenever a physical SMTP transport is opened or reconnected, while retaining fixed-token configuration.


v3.0.1 (06-Jul-2026)

- #8: Updated clustered-object-pool to 4.0.1 so clustered SMTP pools can use cluster-specific defaults.


v2.3.5-v3.0.0 (05-Jul-2026)

- 3.0.0: 05 July 2026: Updated clustered-object-pool to 4.0.0 and made clustered SMTP pools generic over their cluster-key type


v2.3.0-2.3.4

- 2.3.4: 03 June 2024: Updated clustered-object-pool from 2.1.0 to 2.1.1, which solves race conditions when creating new object pools
- 2.3.3: 28 May 2024: Updated clustered-object-pool from 2.0.3 to 2.1.0, which improves performance and solves rare ConcurrentModificationException
- 2.3.2: 04 May 2024: Updated jakarta.mail-api from 2.1.2 to 2.1.3
- 2.3.1: 03 May 2024: Upgraded clustered-object-pool which fixed a bug where exceptions during allocation would cause further issues
- 2.3.0: 17 January 2024: #3: Update to latest Jakarta+Angus dependencies


v2.2.0 (xx January 2023)

- Expose Session instance that was used to produce Transport instances


v2.1.0-2.1.2 (04 January 2023)

- 05 January 2023: Added auto-reconnects for Transport instance that are claimed for imminent reuse
- 04 January 2023: Added OAuth2 support (you still need to add your own OAuth2 security provider though, Simple Java Mail will use Google's reference implementation from https://github.com/google/gmail-oauth2-tools)


v2.0.2 (27 March 2022)

- Updated clustered-object-pool which solves a memory leak when 3rd party deallocation fails with an error


v2.0.0 - v2.0.1 (26 December 2021)

- Switched to Java 8 and new log4j dependency to resolve recent security issue
- Updated to Jakarta 2.0.1


v1.1.2 (2 July 2021)

- Better debug logging for exceptions (specifically Session instances)


v1.1.1 (24 March 2020)

- Switched to Jakarta Mail 1.6.5


v1.1.0 (31 Januari 2020)

- Switched to Jakarta Mail 1.6.3


v1.0.8 - v1.0.10 (30 Januari 2020)

- Updated dependency on clustered-object-pool, which fixes a bug when waiting for pools to shutdown


v1.0.0 - 1.0.7

- Initial release
