A full example of sending an email using testcontainers and a mock smtp server.
In a nutshell there is a candy box with a limited number of candies. When all candies are eat then an alarm is sent to the dashboard and then an email.
For SMTP server is used a James Mock server, as described in my previous post.