From the application container, running on the same docker host, one can set the SMTP server to the postfix container address.
$ docker run --rm --name=postfix \
-e MTP_HOST=foo.com \
eeacms/postfix
Using the mount directive ```-v /etc/localtime:/etc/localtime:ro``` will make sure that the postfix container will share same timezone as the host, so that the emails have correct date and timestamps.
or start postfix (to send emails by using a remote email server)