How to send email out of docker?

Viewed 250

My answer is running in a container. I set up my smtp server and a test email. But got a ERROR in logs "send email to [email protected] failed: dial tcp 218.104.219.235:465: i/o timeout". Seems that some ports need to remap to container?

1 Answers

Normally, the container can directly access the extranet without any other additional configuration. You can try ping your smtp address inside the container to make sure it works, or use the curl command.