bbottema / simple-java-mail

Simple API, Complex Emails (Jakarta Mail smtp wrapper)
http://www.simplejavamail.org
Apache License 2.0
1.22k stars 266 forks source link

[question from newbie] sjm cli does not return #494

Closed wrenashe closed 7 months ago

wrenashe commented 7 months ago

I just tried sjm CLI with the example, Its sjm command session does not return directly, while I want it to do so. How can I configure the opinion in CLI?

Downloads\cli-module-8.6.2-standalone-cli\bin>   sjm send ^
More?     --email:startingBlank ^
More?     --email:from "Mr. Candy" mrcandy@candystore.com ^
More?     --email:withSubject "About those tongue twisters" ^
More?     --email:to "Sweet Cheeks" "sweet.cheeks@candystore.com" ^
More?     --email:cc "Candy Research Group" "<james@candy-insights.com>;<jean@candy-insights.com>" ^
More?     --email:bcc "box1 <info-box@candystore.com>,box2 <reminders@candystore.com>" ^
More?     --email:withPlainText "I discovered a new flavor! (..)" ^
More?     --mailer:withSMTPServer localhost 25
16:24:01 [main] DEBUG ConfigLoader - Property file not found on classpath, skipping config file
16:24:02 [main] DEBUG TransportStrategy - Opportunistic TLS mode enabled for SMTP plain protocol.
16:24:02 [main] TRACE MailerImpl - No proxy set, skipping proxy.
16:24:02 [main] WARN  BatchSupport - Starting SMTP connection pool cluster: JVM won't shutdown until the pool is manually closed with mailer.shutdownConnectionPool() (for each mailer in the cluster)
16:24:02 [main] DEBUG MailerHelper - validating email...
16:24:02 [main] DEBUG MailerHelper - ...no problems found
16:24:03 [main] DEBUG SessionLogger - starting mail with session (host: localhost, port: 25, username: null, authenticate: null, oauth2: false, transport: SMTP)
16:24:03 [main] TRACE MailerImpl -
Email: Email{
        id=<145581669.0.1707467043497@CNSHNTWU01.infor.com>
        sentDate=null
        fromRecipient=Recipient{name='Mr. Candy', address='mrcandy@candystore.com', type=null},
        replyToRecipients=[],
        bounceToRecipient=null,
        text='I discovered a new flavor! (..)',
        textHTML='null',
        textCalendar='null (method: null)',
        contentTransferEncoding='quoted-printable',
        subject='About those tongue twisters',
        recipients=[Recipient{name='Sweet Cheeks', address='sweet.cheeks@candystore.com', type=To}, Recipient{name='Candy Research Group', address='james@candy-insights.com', type=Cc}, Recipient{name='Candy Research Group', address='jean@candy-insights.com', type=Cc}, Recipient{name='box1', address='info-box@candystore.com', type=Bcc}, Recipient{name='box2', address='reminders@candystore.com', type=Bcc}]
}
16:24:03 [main] TRACE MailerImpl -
MimeMessage: Date: Fri, 9 Feb 2024 16:24:03 +0800 (CST)
From: "Mr. Candy" <mrcandy@candystore.com>
To: Sweet Cheeks <sweet.cheeks@candystore.com>
Cc: Candy Research Group <james@candy-insights.com>,
        Candy Research Group <jean@candy-insights.com>
Bcc: box1 <info-box@candystore.com>, box2 <reminders@candystore.com>
Message-ID: <145581669.0.1707467043497@CNSHNTWU01.infor.com>
Subject: About those tongue twisters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I discovered a new flavor! (..)
wrenashe commented 7 months ago

I got the answer from https://github.com/bbottema/simple-java-mail/issues/488#issuecomment-1863920923 , thanks, @bbottema Also https://github.com/bbottema/simple-java-mail/issues/439