View email in docker without sending

hey, i would like to view emails that are generated by programs/websites running in a docker instance - without actually sending those emails into the internet. anyone know how?

basically the equivalent of setting up a test mail server tool on a windows machine to trap all outgoing mail, and then using some .eml viewer to view those emails.