notifier
notifier copied to clipboard
Netty Based Client to Send Emails
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.