-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to jakarta mail
- Loading branch information
labrotni
committed
Aug 22, 2021
1 parent
26eca09
commit 10f32d8
Showing
21 changed files
with
992 additions
and
1,090 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,11 +85,10 @@ SmtpConnectionPool smtpConnectionPool = new SmtpConnectionPool(SmtpConnectionFac | |
//borrow an object in a try-with-resource statement or call `close` by yourself | ||
try (ClosableSmtpConnection transport = smtpConnectionPool.borrowObject()) { | ||
MimeMessage mimeMessage = new MimeMessage(transport.getSession()); | ||
MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, false); | ||
mimeMessageHelper.addTo("[email protected]"); | ||
mimeMessageHelper.setFrom("[email protected]"); | ||
mimeMessageHelper.setSubject("Hi!"); | ||
mimeMessageHelper.setText("Hello World!", false); | ||
mimeMessage.addRecipients(Message.RecipientType.TO, to); | ||
mimeMessage.setFrom("[email protected]"); | ||
mimeMessage.setSubject("Hi!"); | ||
mimeMessage.setText("Hello World!"); | ||
transport.sendMessage(mimeMessage); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.