Description
Problem
The recipient API cleanup in commit 66345568 removed the dedicated to(...), cc(...), and bcc(...) builder methods. The string-based withRecipients(name, fixedName, recipientType, addresses...) overload was deliberately retained for CLI and property-backed use.
The generated CLI now exposes only --email:withRecipients. A single occurrence works, but multiple occurrences are combined by picocli into one flat value list. CliCommandLineConsumer then treats that list as one method invocation and rejects it because the method accepts at most four arguments.
For example, combining TO, CC, and BCC currently fails with:
provided 12 arguments for '--email:withRecipients', but need at most 4
This means one CLI command cannot add more than one recipient type. The regression was introduced in 9.0.0 and is present through 9.1.6.
Intended correction
Restore readable CLI-only --email:to, --email:cc, and --email:bcc options without reintroducing the removed overload forest into the public Java builder API.
Acceptance criteria
sjm sendandsjm validateaccept TO, CC, and BCC recipients in the same command.- The aliases remain CLI-specific and do not expand the public Java builder API.
- A process-level smoke test covers all three recipient types together.
- The published CLI example uses the supported options.
- Affected release notes and milestones carry a restrained compatibility notice until users can upgrade to the fixed release.
Activity
bbottema commentedon Aug 6, 2026
Implemented the correction by restoring
--email:to,--email:cc, and--email:bccthrough an internal CLI-only facade. The publicEmailPopulatingBuilderstays unchanged, while the generated CLI metadata once again treats TO, CC, and BCC as independent options that can be combined in one command.bbottema commentedon Aug 6, 2026
The implementation and compatibility-notice work are complete. Closing this as resolved for the
v9.1.7milestone.bbottema commentedon Aug 6, 2026
The correction is now available in Simple Java Mail 9.1.7. CLI commands can again combine the independent
--email:to,--email:cc, and--email:bccoptions.