notifier icon indicating copy to clipboard operation
notifier copied to clipboard

Netty Based Client to Send Emails

Open alimate opened this issue 5 years ago • 0 comments

Synopsis

Currently, we're using the blocking JavaMailSender to send emails. Even though we're wrapping the blocking call inside CompletableFuture.runAsync, one of our IO threads would be blocked temporarily to make sure we've submitted the Email request.

Proposed Solution

We can write a simple Netty client using the SMTP encoder to send an SMTP request to the mail server in a non-blocking fashion.

alimate avatar Jan 23 '20 16:01 alimate