This repository contains example of how to write an application based on Spring boot and SubEtha SMTP to receive emails.
Full post detailed the process available here :
https://redamessoudi.com/receive-emails-with-subetha-springboot/
I favour simplified code over production-ready code. Don't consider it as best practices, instead use it to understand the goal of the article.
I consider simple and explainable code as a first step to solve problems, best practices and design patterns come next.