bug: cli expected --mailer arguments duplicated 3 times #330
Closed
Description
When I try to send
via command line and provide --mailer:trustingAllHosts true
it fails:
$ ~/cli-module-6.6.1-standalone-cli/bin/sjm send --email:forwarding "C:\progs\outlook-message-parser\src\test\resources\test-messages\attachments.msg" --email:from X basin@acme.com --email:to X basin@acme.com --mailer:withSMTPServer gate1.acme.com 465 "" "" --mailer:trustingAllHosts true --mailer:withTransportStrategy TransportStrategy.SMTP_TLS
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.IllegalArgumentException: provided 0 arguments, but need at least 1
at org.simplejavamail.internal.util.Preconditions.assumeTrue(Preconditions.java:49)
at org.simplejavamail.internal.clisupport.CliCommandLineConsumer.consumeCommandLineInput(CliCommandLineConsumer.java:67)
at org.simplejavamail.internal.clisupport.CliSupport.runCLI(CliSupport.java:44)
at org.simplejavamail.cli.SimpleJavaMail.main(SimpleJavaMail.java:31)
Debugging shows that it expects 3 instances of --mailer:trustingAllHosts and for the 1st one it successfully reads the input argument, but for the 2nd one it thinks zero arguments were provided