This PR uses Apache Commons Email to send plain text emails to an unauthenticated SMTP endpoint as long as the environment variable AOI_FROM_ADDRESS is set and not empty. Otherwise, the CLI continues to default to publishing email messages to stdout.
And we can verify that emails were properly sent via SMTP to the running mailhog endpoint by inspecting the web console provided by mailhog at http://localhost:8025 :
Overview
This PR uses Apache Commons Email to send plain text emails to an unauthenticated SMTP endpoint as long as the environment variable
AOI_FROM_ADDRESS
is set and not empty. Otherwise, the CLI continues to default to publishing email messages to stdout.Demo
I configured my environment with:
and started a MailHog container with:
Then I ran the CLI from SBT after configuring some Notification objects in the connected Postgres database, something like:
SBT stdout looks like:![Screen Shot 2019-11-19 at 5 46 18 PM](https://user-images.githubusercontent.com/1818302/69193692-58b8e900-0af5-11ea-9572-217e2e2945c4.png)
And we can verify that emails were properly sent via SMTP to the running mailhog endpoint by inspecting the web console provided by mailhog at http://localhost:8025 :![Screen Shot 2019-11-19 at 5 46 13 PM](https://user-images.githubusercontent.com/1818302/69193716-68d0c880-0af5-11ea-8deb-5bf1d7e673d3.png)
Success!