You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use the selected protocol's username for OAuth connections #38
When an OAuth connection uses SMTPS, the pool can explicitly authenticate with an unrelated SMTP username left on the same Session. This affects released 4.4.0 and makes credential selection depend on whether the connection is pooled.
The current OAuth allocator always supplies mail.smtp.user explicitly. The selected SMTPS provider consequently receives old@example.org together with the current account's token.
Let the selected connection's protocol determine username resolution, preserving Jakarta Mail's ordinary username fallback and supplied Session properties. SMTP and STARTTLS use the SMTP settings; SMTPS uses the SMTPS settings. Apply the same rule to initial allocation and reconnection for both fixed tokens and token suppliers. A connected lease still reuses its connection without another supplier call. Preserve authentication failures, cancellation and cleanup.
The fixed-token path originated with Simple Java Mail #421; #9 added connection-time suppliers. This correction needs no new public API or configuration option and belongs in compatible patch release 4.4.1. Simple Java Mail's matching protocol applicability decisions are ADR 0015, ADR 0038 and ADR 0039.
Available in 4.4.1. OAuth connections now preserve the selected provider's username resolution instead of explicitly supplying the SMTP username for every protocol. Fixed tokens and suppliers retain normal fallback, reconnection and Session ownership behavior.
The correction is in 132a5f5. SJM #966 carries the matching dependency update for the 10.0.0 development branch.
Activity
fix(pool): use selected-provider OAuth usernames (#38)
build(release): align OAuth username patch documentation (#38)
fix(release): exclude local metadata from Central bundles (#38)
bbottema commentedon Nov 5, 2026
Available in 4.4.1. OAuth connections now preserve the selected provider's username resolution instead of explicitly supplying the SMTP username for every protocol. Fixed tokens and suppliers retain normal fallback, reconnection and Session ownership behavior.
The correction is in 132a5f5. SJM #966 carries the matching dependency update for the 10.0.0 development branch.