Docker Community Forums

Share and learn in the Docker community.

Send mail from Docker container

Hi there,
I have a Docker container running in Amazon Linux 2.
Website back-end is deployed in docker image, add it is published via port 80.

Now I need to send email from Docker container to users, and I already configure postfix in host:
inet_interfaces = 172.17.0.1 (ip of docker0)
mynetworks = 127.0.0.1, 172.17.0.2 (this is ip of docker container)
In Docker container, I also install mailx and sendmail

Im able to send email from host, but I cannot send the email from Docker container.
What configurations do I miss?
Can anyone help me on this.
Thanks