SMTP Relay service allows you to use an external SMTP server to send your mails through. After many frustrating hours of working with several SMTP Relay Docker Images, I finally found the one that works.
Link: https://hub.docker.com/r/tecnativa/postfix-relay/
Configuration is very easy; Sample Run script
docker run \ --name name\ -d \ --restart=always \ -p localport:25 \ -e "MAIL_RELAY_HOST=smtpserver" \ -e "MAIL_RELAY_PORT=port#" \ -e "MAIL_RELAY_USER=user" \ -e "MAIL_RELAY_PASS=post" \ tecnativa/postfix-relay
After this you will have a running Docker container that will relay all your emails to the “smtpserver” you have set.