hutiefang76 opened a new pull request, #406: URL: https://github.com/apache/commons-email/pull/406
`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](https://issues.apache.org/jira/browse/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. - [x] Read the contribution guidelines. - [x] Read the ASF Generative Tooling Guidance. - [x] 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. - [x] Run a successful build using the default Maven goal. - [x] Add behavioral tests that fail against the original implementation. - [x] Describe the problem, behavior and validation. - [x] Use a meaningful commit message containing the existing Jira key. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
