Skip to content

[EMAIL-185] Honor SMTPS authentication properties in supplied sessions - #406

Open
hutiefang76 wants to merge 1 commit into
apache:masterfrom
hutiefang76:frank/fix-email185-smtps-session-20261112
Open

hutiefang76 wants to merge 1 commit into
apache:masterfrom
hutiefang76:frank/fix-email185-smtps-session-20261112

Conversation

@hutiefang76

Copy link
Copy Markdown

setMailSession() reads SMTP credentials even when the supplied session selects the smtps transport. Select the matching authentication properties in both mail modules, keeping the supplied session when authentication is disabled or credentials are incomplete.

Addresses EMAIL-185.

Validation on JDK 21 with the project's Java 8 compiler configuration:

  • Before the fix: 18 new regression/control cases, 10 assertion failures and no errors.
  • With the fix: all 18 pass, including a real Session authentication callback.
  • Default mvn -B -ntp: BUILD SUCCESS; 422 tests, zero failures/errors, 6 existing disabled cases (416 passed). No test exclusions were added.

The tests verify session configuration and credential selection; no live SMTPS server interoperability result is claimed.

  • Read the contribution guidelines.
  • Read the ASF Generative Tooling Guidance.
  • AI was used: DeepSeek assisted diagnosis, tests, implementation and first-pass review. Codex corrected and reviewed the patch, ran validation and prepared this description. Commits include Assisted-By trailers; no human review is claimed.
  • Run a successful build using the default Maven goal.
  • Add behavioral tests that fail against the original implementation.
  • Describe the problem, behavior and validation.
  • Use a meaningful commit message containing the existing Jira key.

Select the authentication property namespace from the supplied transport.
Preserve SMTP defaults and sessions with disabled or incomplete authentication.
Cover the mirrored Jakarta and javax implementations with session tests.

Assisted-By: DeepSeek
Assisted-By: Codex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant