This is a simple refactoring exercise by Matteo Vaccari that is meant to teach something about dependency inversion and dependency injection.

The documentation:

We refactored the initial code to decouple domain objects from file system and email sending using ports and adapters as the exercise suggested.

We think there's still a lot of room for improvement in the adapters code.