Have you ever needed to test mail functions for a project and didn't want to spam the real web? Use Mailcatcher!
docker run -d -p 1080:1080 -p 1025:1025 --name=mailcatcher -itd --network=mailcatcher sj26/mailcatcher
Using the above command will start Mailcatcher with a UI accessible at localhost:1080
and mail coming in on port 1025. Link your containers to Mailcatcher via networks and setup your mail server to send to mailcatcher:1025
and you'll be set.
An alternative to Mailcatcher that is much more modern and requires no local setup is Mailtrap. I've personally switched to this instead.